Because the return type of ObjectToString() is RexxStringObject, this
is guaranteed to be a string object.  The same thing occurs when a
string object is specified as an argument type.

Rick

On Wed, Jul 13, 2011 at 5:19 AM, Rony G. Flatscher
<rony.flatsc...@wu-wien.ac.at> wrote:
> Will the ObjectToString(obj)-API guarantee to return a string object for
> which the String*-APIs can be safely used?
>
> I.e. would ObjectToString(...) turn a "hidden Integer" or a NumberString
> object to a String object?
>
> ---rony
>
>
>
>>>>> IsString() will only return true if the object is exactly an instance
>>>>> of string.  IsOfType() will return for other objects that are not
>>>>> necessarily strings, such as subclasses or even the hidden Integer and
>>>>> NumberString instances.
>>>>>
>>>>>
>>>>>
>>>> Ahh, that explains this, thank you very much!
>>>>
>>>> (The error occurs when the object is an integer, so the test in this
>>>> case will yield different results. Will use IsOfType() instead of
>>>> IsString() in these un/marshalling cases.)
>>>>
>>>>
>>> IsString() is intended for tests to determine if an object can be used
>>> for any the String APIs, not for general IsA tests.  Note the using
>>> IsOfType() to test for a String value does not guarantee the object
>>> can be used with the String APIs.
>>
>
>
> ------------------------------------------------------------------------------
> AppSumo Presents a FREE Video for the SourceForge Community by Eric
> Ries, the creator of the Lean Startup Methodology on "Lean Startup
> Secrets Revealed." This video shows you how to validate your ideas,
> optimize your ideas and identify your business strategy.
> http://p.sf.net/sfu/appsumosfdev2dev
> _______________________________________________
> Oorexx-devel mailing list
> Oorexx-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>

------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric 
Ries, the creator of the Lean Startup Methodology on "Lean Startup 
Secrets Revealed." This video shows you how to validate your ideas, 
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to