' Collection of code snippets by Arne Vajhøj 
' (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) 
function integer add(integer a, integer b)
    add = a + b
end function
!
function string conc(string a, string b)
    conc = a + b
end function
!
function xdata xmodify(xdata o)
    %include "data.bas"
    declare xdata temp
    declare integer ix
    ix = len(o::sv)
    while ix > 1 and (mid$(o::sv, ix, 1) = chr$(32) or mid$(o::sv, ix, 1) = chr$(0))
        ix = ix - 1
    next
    temp::iv = o::iv + 1
    temp::sv = mid$(o::sv, 1, ix) + "X"
    xmodify = temp
end function
