Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10204
Posted: 03:23am 07 Nov 2016
Copy link to clipboard
Print this post
I've separately copied this to Geoff but be aware passing a composite string to a function where the composite includes the return from a string function will fail
option autorun on Option explicit option default NONE dim s1$="start-" dim s2$="-end" dim integer maxtemp=144 dim b$,t$ b$=s1$+outtemp$(maxtemp)+s2$ print b$ sendtext b$ 'this works OK t$=outtemp$(maxtemp) sendtext s1$+t$+s2$ 'this works OK sendText s1$+outtemp$(maxtemp)+s2$ 'this fails ' function outtemp$(t as integer) outtemp$=str$(t) end function '
sub SendText(a$) local c$ c$=STR$(len(a$)) print c$ end sub