[Tutor] is it possible to embed data inside a script?

Joseph Paish jpaish@freenet.edmonton.ab.ca
Sat Aug 2 08:57:01 2003


On Sunday 20 July 2003 21:17, Kirk Bailey wrote:
> Sure thing.
>
> domainname=3D"tinylist.org"
> password=3D"swordfish"
> id=3D"idiot1@netzero.net"
>
> simple enough, but wait, there's more!
>
> array1()=3D'2','3','3','4','4','4','5','5','5','5','6','6','6','6','6',=
'7','7
>','7','7','7','7',...
>
> (2dice, 6 sides, in a matrix. Use ramdom.choice to pick one of them.
> Weighted correctly for 2s6)
>
> These are simplistic examples, but sure, data is just data. You can ass=
ign
> it to any variable type in a declaration whenever you like.
>
> Now, when this means a LOT of data, thing can get boring and real easy =
to
> get mixed up in the programmer's mind. Ever see a program with several
> HUNDRED DATA statements, read by a READ statement? When you go in to ch=
ange
> something, it is EASY to get totally lost, espically when it is a progr=
am
> which does not number lines.
>
> Why  is it important to store a lot of data IN the program?

not really that important.  just trying to clear up a couple dozen short=20
scripts each of which has about 10 lines of data.  that way i can cut dow=
n on=20
the number of tiny files that i have built up over the years.

joe
=20