|
Post by Nicky Peter Hollyoake on Sept 21, 2008 12:55:35 GMT -5
To be able to do this:
Sub AddStringToString(&String_1$(), &String_2$())
Dim i
if ArrayMax(String_1$) < ArrayMax(String_2$) OR ArrayMax(String_1$) > ArrayMax(String_2$) Then Return Endif
For i = 0 To ArrayMax(String_1$) String_1$(i) = String_1$(i) + String_2$(i) Next
EndSub
Dim Str1$(1): Str1$(0) = "String ": Str1$(1) = "String " Dim Str2$(1): Str2$(0) = "1": Str2$(1) = "2"
AddStringToString(Str1$, Str2$)
Printr Str1$(0) Printr Str1$(1)
Without having to do all the long code.
Str1$ = Str1$ + Str2$
Like you can do with reals.
Dim a#(1), b#(1)
a# = a# + b#
- Nicky
|
|
|
Post by smc44 on Sept 24, 2008 9:04:44 GMT -5
useful maybe for many inputs
|
|
|
Post by andrian on Sept 24, 2008 10:01:12 GMT -5
I didn't know you could add arrays of reals!
|
|