Maarten ter Huurne wrote:
> As far as I know, 'usr' can use a string argument,
> but will always return an integer.
Incorrect - see below...
Floris wrote:
> no,
>
> a usrdef can return a string. In fact, when you give a string as
> argument, you get type-errors if you return a non-string (well on my
> 8235 anyway).
True. IIRC, at entry of the USR routine, register A holds
the type of the argument and the system variable DAC holds the actual
value or the string descriptor. At the exit of the USR routine,
DAC has to contain the return value (or string descriptor) and
register A the return type. This is actually very fancy: you can
use *one* USR routine which can return different results and result
types depending on the value and/or type of the argument.
Eric
****
MSX Mailinglist. To unsubscribe, send an email to [EMAIL PROTECTED]
and put "unsubscribe msx [EMAIL PROTECTED]" (without the quotes) in
the body (not the subject) of the message.
Problems? contact [EMAIL PROTECTED]
More information on MSX can be found in the following places:
The MSX faq: http://www.faq.msxnet.org/
The MSX newsgroup: comp.sys.msx
The MSX IRC channel: #MSX on Undernet
****