Code: Select all
0 a=0: x=0: y=0: z=0: i=0: c={pi}: a$=""
Code: Select all
0 a=0: x=a: y=a: z=a: i=a: c={pi}: a$=""
Code: Select all
0 a= x= y= z= i= a$= " ": c={pi}
Regards,
Shaun.
Code: Select all
0 a=0: x=0: y=0: z=0: i=0: c={pi}: a$=""
Code: Select all
0 a=0: x=a: y=a: z=a: i=a: c={pi}: a$=""
Code: Select all
0 a= x= y= z= i= a$= " ": c={pi}
Code: Select all
0 a=0: i=a: x=a: y=a: z=a: a$=" ": c={pi}: ti$="000000"
1 for a=0 to 9:for i=0 to 9:for x=0 to 9
:for y=0 to 9:for z=0 to 9
2 c=c+0.1:a$=a$+" ":if len(a$)>254 then
a$=""
3 next z, y, x, i, a:print ti, ti$
But it won't work because a null value is not the same as a blank string variable...Shaun_B wrote:I wasn't trying mass variable assignment in the last example, I was just simply trying to say "Hey BASIC, you've used these variables before" or something. I mean you don't have to declare and initialise any variables. Switch the Commodore 64 on and PRINT A and it will output zero.
That's what the DIM-instruction is for:Shaun_B wrote:I'm pretty certain that declaring (and therefore initialising) your variables before they are used (in BASIC v2 anyway) has a slightly positive effect on the speed later on in the program.
Code: Select all
dim a,b,c%,d$,...
Users browsing this forum: No registered users and 14 guests