Took me a while to figure out the problem the StrCat structure is correct.
intcontrol(73, 2, 0, 0, 0) ; GOSUB error handler.
Tails = 'Tails'
Heads = 'Heads'
fName = strcat(Heads, ' or ', Tails, '.', Ext)
clipput(fName)
:Cancel
return
;__________________________________________________________________________________________
:WBERRORHANDLER
Error = LastError()
if Error==2058 ; StrCat: Function syntax error
; Deal with it.
fName = Heads : ' or ' : Tails : '.' : Ext
return
endif
ErrInfo = strcat('Error: #', Error, ': ', wberrortextstring, @crlf, 'Script: ', wberrorhandlerline, @crlf, 'Assignment: ', wberrorhandlerassignment, @crlf, 'File: ', wberrorhandlerfile, @crlf, 'Procedure: ', wberrorinsegment, @crlf, 'Line No. ', wberrorhandlerlinenumber, @crlf)
clipput(ErrInfo)
pause('Error Message on Clipboard', ErrInfo)
exit
This line
fName = Heads : ' or ' : Tails : '.' : Ext
comes up with the right error message.
Are you suggesting that the StrCat function should return the fatal error 3052: Uninitialized variable or undefined function rather than the moderate error 2058: StrCat function syntax error?
The fatal error. If the variables used are not defined in close proximity to the function (which was my situation) then it can take a fair bit of time to figure out why the statement is causing an error.
The developers have been notified of your request.