String to Variable

Blitz3D Forums/Blitz3D Programming/String to Variable

Fuller(Posted 2006) [#1]
I want to convert a string to a variable and the only way I can think of doing this is creating an infinite array and storing the string to a variable - StringVar[n]. Any better ways to do it?


b32(Posted 2006) [#2]
Maybe you could store the string into a bank ?
a$ = "Bram"
bank = CreateBank(4)

For i = 1 To Len(a$)
	PokeByte bank, i - 1, Asc(Mid$(a$, i, 1))
Next

For i = 1 To Len(a$) Step 4
	j = PeekInt(bank, i - 1)
	Print j
Next



Fuller(Posted 2006) [#3]
not thinking clearly today... Of course... Thanks.