How to define the leng of a variable when write or writeline (Language Help)

by jwc3119, Tuesday, August 02, 2011, 06:29 (2156 days ago) @ Atonau

I want to write a variable (name$) to a file (txt), but this variable is on a loop, so changes it values from loop to loop, so its lengh to...
Is there a way to make it have the same lengh from loop to loop?

later i want to open the file to read the lines and make operations with them... count, sum and so on... so i need the variables to have the same lengh...

Thanks for all

Hello,

I wrote some code to make file names with the same length. Is this what you had in mind?

Jim topjimmy22@hotmail.com

cls
# array z$[ ] holds extra zeros as strings
dim z$(4)
z$[0] = "0000" : z$[1] = "000" : z$[2] = "00" : z$[3] = "0"
for i = 1 to 100
j$ = string(i)
k$ = "filename" + z$[length(j$)] + j$
print k$
next i


Complete thread:

 RSS Feed of thread

powered by my little forum