yet another personal build (archive) - page 8 - CHDK Releases - CHDK Forum supplierdeeply

yet another personal build (archive)

  • 117 Replies
  • 55135 Views
*

Offline Jucifer

  • *****
  • 251
  • [A710IS]
yet another personal build (archive)
« Reply #70 on: 13 / May / 2008, 09:34:38 »
Advertisements
Are there current (or future) commands, that (should) return more than one value? If you want a function to return multiple values in Lua, you could do it with tables. I guess. :]

*

Offline Aged

  • *
  • 39
yet another personal build (archive)
« Reply #71 on: 13 / May / 2008, 13:57:45 »
 Returning  multiple variables
Quote
Fbonomi 28 April

At the moment I have implemented the ubasic get_histo_value command:
get_histo_value h i v
    h=which histogram you want to read (0-4, selecting R, G, B, RGB or Y histogram)
    i=which position of the histogram you want to read (0-127)
    v=variable where the result is placed


*

Offline Jucifer

  • *****
  • 251
  • [A710IS]
yet another personal build (archive)
« Reply #72 on: 13 / May / 2008, 14:47:18 »
h i v...
h is a parameter
i is a parameter
v is what's returned

this would be just v=get_histo_value h i

*

Offline Velo

  • *
  • 30
yet another personal build (archive)
« Reply #73 on: 13 / May / 2008, 16:25:08 »
Are there current (or future) commands, that (should) return more than one value? If you want a function to return multiple values in Lua, you could do it with tables. I guess. :]

Tables would be one way. The other is to return multiple values:

Code: [Select]
function test()
  return 15, "text", 30
end

a, b, c = test()

print( a, b, c )      -- results in: 15 text 30



*

Offline Jucifer

  • *****
  • 251
  • [A710IS]
yet another personal build (archive)
« Reply #74 on: 15 / May / 2008, 13:35:12 »
updated tx1 builds (080515) with fantomas' hotfix for Tv bracketing

yet another personal build (archive)
« Reply #75 on: 15 / May / 2008, 14:20:17 »
Thanks, Jucifer!
-Is that for both your regular as well as you evil builds, or just the evil? (I don't see current date on the regular list.)
Whoa-Hey! Careful where you point that thing. You're gonna shoot someone!

http://chdk.wikia.com/wiki/DoF_Stacking

*

Offline Jucifer

  • *****
  • 251
  • [A710IS]
yet another personal build (archive)
« Reply #76 on: 15 / May / 2008, 14:33:06 »
Sorry, I'm being lazy and updating the evil build for now. I'll update the regular-ubasic-syntax-build when I have the time and effort to do it.

yet another personal build (archive)
« Reply #77 on: 15 / May / 2008, 20:29:22 »
M'okay, Jucifer, you deserve to be lazy. :D
Just lemme know when you do update the Ubasic build.
I use that one because I'm a script junkie. :)
Whoa-Hey! Careful where you point that thing. You're gonna shoot someone!

http://chdk.wikia.com/wiki/DoF_Stacking


*

Offline Jucifer

  • *****
  • 251
  • [A710IS]
yet another personal build (archive)
« Reply #78 on: 16 / May / 2008, 13:13:17 »
updated

Ok.

In build 59 (and up until undefined build number) uBASIC "get_" commands have both the "new" and the "old" syntax. I'm still planning not to support the "old" syntax in the "evil experimental" builds, but will still release "normal" builds, that shouldn't break existing scripts (but still have the "new" syntax). I just would like to have a uniform syntax (the "new" one, of course ;) for those commands...

'nuff daydreamin'

Bottom line of uBASIC syntax for commands starting with "get_" in my builds:
"New" syntax "[x=]get_command" ([] means optional) works with every get_command with both builds, experimental (#yymmdd) and normal (#no).
"Old" syntax "get_command v" as described in Wikia works with normal (#no) builds as described in Wikia.


Oh, and updated yaDOFs.
« Last Edit: 16 / May / 2008, 13:25:45 by Jucifer »

yet another personal build (archive)
« Reply #79 on: 16 / May / 2008, 14:09:20 »
I'm kinda confused; Does this mean that for now, you'll be incorporating "old syntax" in the evil build so it will run old scripts as well as new scripts written in "new syntax"?
Whoa-Hey! Careful where you point that thing. You're gonna shoot someone!

http://chdk.wikia.com/wiki/DoF_Stacking

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal