Alpha Documentation


Pros/Cons


  • Faster than string addition


Example 1


first = "Steve"

last = "Wood"

space = " "

dim name as c

*concat(name,first)

*concat(name,space)

*concat(name,last)

?name

= "Steve Wood"


Example 1 - Alternate Method (string addition)


first = "Steve"

last = "Wood"

dim name as c

name = first + last

?name = SteveWood


Example 2


lst = <<%txt%

California

Nevada

New York

Oregon

%txt%


dim output as c = ""

for each foo in lst

  *concat(output,convert_type(foo,"C"))

  *concat(output,",")

next

?output

= "California,Nevada,New,Oregon,"


output = strip_trailing_char(output,",")

?output

= "California,Nevada,New,Oregon"


Example 2 - Alternate Method


lst = <<%txt%

California

Nevada

New York

Oregon

%txt%


output = crlf_to_comma(lst)

?output

= "California,Nevada,New,Oregon"