repeating a string
Frank D. Engel, Jr.
fde101 at fjrhome.net
Tue Mar 22 08:12:42 CST 2005
-----BEGIN PGP SIGNED MESSAGE-----
If you use 'local' or 'global' to declare your variables, this is true,
unless you specify initial variables at this point.
However, implicit variable declarations (just using the variable name)
causes them to be initialized to the name of the variable:
Try typing something like "put xyzzy" into the msg box (no quotes), the
response is "xyzzy" (again, no quotes).
This works for other names, too - things like "orange", "fuzzy", and
"glass" -- whatever is not defined as a keyword or property, etc., and
even for some things that are.
This is why some of the special "constants" like bold work -- in fact,
doing a multiline msg box and using this code:
put a into bold
results in "a" -- not "bold", even though "bold" is documented as a
Next in my line of experiments, I tried this:
Which results in empty. Even though "bold" is documented as a keyword,
I don't think Rev actually does *anything* special with it. The
described behavior for bold flows naturally from the normal workings of
Transcript, as long as noone tries to cheat by assigning it a value or
declaring it ;-)
On Mar 21, 2005, at 8:52 PM, Alex Tweedly wrote:
>> Also, I am somewhat uncomfortable with the notion of uninitialized
> There is no such thing in Rev. It is defined (and documented) that
> variable which have no specified initial value are created as empty.
Frank D. Engel, Jr. <fde101 at fjrhome.net>
$ ln -s /usr/share/kjvbible /usr/manual
$ true | cat /usr/manual | grep "John 3:16"
John 3:16 For God so loved the world, that he gave his only begotten
Son, that whosoever believeth in him should not perish, but have
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)
-----END PGP SIGNATURE-----
$0 Web Hosting with up to 120MB web space, 1000 MB Transfer
10 Personalized POP and Web E-mail Accounts, and much more.
Signup at www.doteasy.com
More information about the use-livecode