reading a file
Alain Farmer
alain_farmer at yahoo.com
Sun Sep 21 18:33:26 EDT 2014
in reply to: Why is it that if I explicitly want to open a file, I have to put quotes around the name, but if I put the name in a variable, I do not need the quotes?
unquoted names will be interpreted as variables ; with quotes, interpreter knows that it is a literal STRING.
being in a variable is self-delimiting; no need for quotes.
On Sunday, September 21, 2014 6:16 PM, "larry at significantplanet.org" <larry at significantplanet.org> wrote:
Thanks Alain,
Why is it that if I explicitly want to open a file, I have to put quotes
around the name, but if I put the name in a variable, I do not need the
quotes?
Thank you again,
Larry
----- Original Message -----
From: "Alain Farmer" <alain_farmer at yahoo.com>
To: "How to use LiveCode" <use-livecode at lists.runrev.com>
Sent: Sunday, September 21, 2014 4:09 PM
Subject: Re: reading a file
> replace:
> put quote & it & quote into thisFile
> with
> put it into thisFile
>
>
> On Sunday, September 21, 2014 6:03 PM, "larry at significantplanet.org"
> <larry at significantplanet.org> wrote:
>
>
>
> Hello,
>
> Could anyone please explain why the following script does not work?
> (It puts into the field the name of the selected file and not the contents
> of the file.
>
> on mouseUp
>
> answer file "Select a file."
>
> put quote & it & quote into thisFile
>
> open file thisFile
>
> read from file thisFile until EOF
>
> put it into field myOutput
>
> close file thisFile
>
> end mouseUp
>
>
>
> Thanks,
>
> Larry
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list