Is it possible?...

BlitzMax Forums/BlitzMax Beginners Area/Is it possible?...

Picklesworth(Posted 2005) [#1]
Is it possible to write out a string, and include values of variables in it without going crazy with stuff like ","+var1+","+var2+","+var3.
Could I instead have something like: ","var1","var2","var3",". Or possibly easier. Basically, it is incredibly confusing, even with syntax highlighting, to do that stuff with "a"+"b"+c#


Dreamora(Posted 2005) [#2]
No it isn't ( and wouldn't make much sense as well or do you want to have

"a".concenate ("b").concenate ("c") instead of "a"+"b"+"c"? :)


Dirk Krause(Posted 2005) [#3]
you could do something like

Print myPrint(["this","is",String(3.141),"some",String(2),"test"])

Function myPrint:String(a:String[])
Local temp:String
For Local i:String = EachIn a
temp:+ i + " "
Next
Return temp
End Function


Picklesworth(Posted 2005) [#4]
Well that's a bit easier to write out :)


Will(Posted 2005) [#5]
just build up your string on many lines if u get confused

text = text + " " + a
text = text + " " + b
text = text + " " + c
text = text + "."