The $ can be omitted in the CALCULATE DEFiniton as the DEF command does not directly check the variable types inside the definition:
EDIT: These with return values can be:
So you can do something like this
'calculate the middle Def MID(X,M,B)'M can be M$ too Return X-LEN(M)*(B/2) End Print MID(200,"dummy",8)'returns 180 rem.calling.the.function.with.PRINT/?
DEF MID(X,S,W) 'usable with PRINT, etc. 'Only 1 return value 'Format: V=MID(X,S,W) DEF RIGHT X,S,W OUT V1,V2,... 'cannot be used in PRINT, etc. 'You can set as many return values as you need from the DEFined instruction at once 'Format: RIGHT X,S,W OUT V1,V2,...Also: COMMON DEF Usable even if that DEFinition is in a different slot. (Use USE to use the COMMON DEFs in that slot. Regular DEFs won't be usable.