Page 1 of 1
Array of fields
Posted: Fri Jul 13, 2007 4:08 pm
by proza
I have a number of fields on a card labelled "f1", "f2", "f3", etc
I would like to ask is it possible to access then like an array?
For example:
repeat with i=1 to whatever
put i into field "f" & i
end repeat
Thanks!
Posted: Fri Jul 13, 2007 7:23 pm
by xApple
Yes absolutly, your code seams to be functional. Is it not ?
To add a layer of abstraction to commands you write in trascript the merge() and format() command are intresting. You can find a few exemples here:
http://forums.runrev.com/phpBB2/viewtopic.php?t=487
Posted: Sat Jul 14, 2007 4:19 am
by proza
When I click Apply, there is an error complaining about the & sign.
Posted: Sat Jul 14, 2007 7:53 am
by Klaus
Hi proza,
use brackets and it will work
repeat with i=1 to whatever
put i into field ("f" & i)
end repeat
Rev will evaluate the string first to "f1", "f2" etc.
Regards
Klaus
P.S.
But an array is a complete different animal

Posted: Mon Jul 16, 2007 4:31 am
by proza
Thanks Klaus.