--On Monday, July 1, 2002 3:31 PM -0400 "Lurie, Nicholas" 
<[EMAIL PROTECTED]> wrote:

>
> Is there anyway to create a file using a variable?
>
> Suppose I have a variable called sub and I want to save text to a file
> named sub.txt where sub is a number from 1 to 100.
>
> Normally, I would write
>
> open file "sub.txt"
> put results & cr into file "sub.txt" at eof
> close file "sub.txt"
>
> How can I change the filename based on the current value of sub?

put 5 into sub
open file (sub & ".txt") # or without ()
put the result into file (sub & ".txt") at eof
close file (sub & ".txt")

Alternatively you can do:
put 5 & ".txt" into sub
open file sub

>
> Thanks!



Regards, Andu Novac
_______________________________________________
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard

Reply via email to