[Gambas-user] Executing a constructed instruction

Craig Packard c0de3 at ...43...
Wed Jun 16 13:22:45 CEST 2004


In VB you can do:

For i = 1 to 11
	mvar = "text" & i & "b.txt"
	Print mvar
Next

Same?  From you example I don't see what & adds.  I
know in some lanuages that means the address of the
variable in memory not the value but it doesn't appear
to mean that from you example.  Also remember MS
didn't write Foxpro.  They bought it.


	- Craig




> -----Original Message-----
> From: Jeff Johnson [mailto:jeffjohnson at ...377...]
> Sent: Tuesday, June 15, 2004 3:15 PM
> To: gambas-user at lists.sourceforge.net
> Subject: Re: [Gambas-user] Executing a constructed
instruction
> 
> 
> Foxpro had the & command
> You could say 
> A = 1
> do while A < 12
>       mvar = "text" + Str(A) + "b.txt"
>       print &mvar
>      A = A + 1
> enddo
> 
> 
> prints text1b.txt, text2b.txt etc
> 
> in other words the & meant the contents of a varable
like a pointer
> I always missed that in VB  and wondered why MS
never carried it over
> 
> 


		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 




More information about the User mailing list