Difference between revisions of "PRINT R()"
From Recital Documentation Wiki
Yvonnemilne (Talk | contribs) |
Yvonnemilne (Talk | contribs) |
||
Line 43: | Line 43: | ||
[phone] => (503) 555-9931 | [phone] => (503) 555-9931 | ||
) | ) | ||
+ | ) | ||
+ | </pre> | ||
+ | <code lang="recital"> | ||
+ | class NullData dynamic | ||
+ | property mCHARACTER | ||
+ | property mNUMERIC | ||
+ | endclass | ||
+ | |||
+ | oNULLDATA = new NullData() | ||
+ | oNULLDATA.mCHARACTER = "" | ||
+ | oNULLDATA.mNUMERIC = 0 | ||
+ | oNULLDATA.mLOGICAL = .F. | ||
+ | print_r(oNULLDATA) | ||
+ | </code> | ||
+ | <pre> | ||
+ | Object (refcnt=0) | ||
+ | ( | ||
+ | [mcharacter] => | ||
+ | [mnumeric] => 0 | ||
+ | [mlogical] => False | ||
) | ) | ||
</pre> | </pre> |
Revision as of 16:57, 5 November 2009
Purpose
Display object information in a readable format
Syntax
PRINT_R(<object-ref>)
See Also
ACLASS(), ADDPROPERTY(), AMEMBERS(), ARRAY(), CLASS, COMPOBJ(), CREATEOBJECT(), DEFINE CLASS, DODEFAULT(), METHOD, NEWOBJECT(), OBJECT(), REMOVEPROPERTY(), SET CLASSLIBRARY, WITH
Description
Example
open database southwind select * from shippers into name shipobj print_r(shipobj)
Dynarray (refcnt=0) ( [row1] => Dynarray ( [shipperid] => 1 [companyname] => Speedy Express [phone] => (503) 555-9831 ) [row2] => Dynarray ( [shipperid] => 2 [companyname] => United Package [phone] => (503) 555-3199 ) [row3] => Dynarray ( [shipperid] => 3 [companyname] => Federal Shipping [phone] => (503) 555-9931 ) )
class NullData dynamic property mCHARACTER property mNUMERIC endclass oNULLDATA = new NullData() oNULLDATA.mCHARACTER = "" oNULLDATA.mNUMERIC = 0 oNULLDATA.mLOGICAL = .F. print_r(oNULLDATA)
Object (refcnt=0) ( [mcharacter] => [mnumeric] => 0 [mlogical] => False )
Products
Recital, Recital Server