Difference between revisions of "PRINT R()"
From Recital Documentation Wiki
Yvonnemilne (Talk | contribs) |
Barrymavin (Talk | contribs) (→Example) |
||
(9 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
==Purpose== | ==Purpose== | ||
Display object information in a readable format | Display object information in a readable format | ||
Line 10: | Line 8: | ||
==See Also== | ==See Also== | ||
− | [[ACLASS()]], [[ADDPROPERTY()]], [[AMEMBERS()]], [[ | + | [[ACLASS()]], [[ADDPROPERTY()]], [[AMEMBERS()]], [[CLASS]], [[CLASS - Methods]], [[CLASS - Parameters]], [[CLASS - Properties]], [[CLASS - Scoping]], [[COMPOBJ()]], [[CREATEOBJECT()]], [[DEFINE CLASS]], [[DISPLAY CLASSES]], [[DODEFAULT()]], [[FOREACH]], [[LIST CLASSES]], [[LOADOBJECT()]], [[METHOD]], [[NEWOBJECT()]], [[OBJECT()]], [[PRINT_HTML()]], [[PRINT_JSON()]], [[PRINT_XML()]], [[REMOVEPROPERTY()]], [[REQUIRE_ONCE()]], [[SAVEOBJECT()]], [[SQL SELECT]], [[WITH]] |
==Description== | ==Description== | ||
+ | The PRINT_R() function is used to display information about the specified object, <object-ref>, in a human readable format. | ||
+ | Tip: You can display the same information just by using the "echo objname" command. | ||
==Example== | ==Example== | ||
<code lang="recital"> | <code lang="recital"> | ||
open database southwind | open database southwind | ||
− | select * from shippers into | + | select * from shippers into object shipobj |
print_r(shipobj) | print_r(shipobj) | ||
</code> | </code> | ||
<pre> | <pre> | ||
− | Dynarray (refcnt= | + | Dynarray (refcnt=1) |
( | ( | ||
− | [row1] => Dynarray | + | [row1] => Dynarray (refcnt=1) |
( | ( | ||
[shipperid] => 1 | [shipperid] => 1 | ||
Line 31: | Line 31: | ||
[phone] => (503) 555-9831 | [phone] => (503) 555-9831 | ||
) | ) | ||
− | [row2] => Dynarray | + | [row2] => Dynarray (refcnt=1) |
( | ( | ||
[shipperid] => 2 | [shipperid] => 2 | ||
Line 37: | Line 37: | ||
[phone] => (503) 555-3199 | [phone] => (503) 555-3199 | ||
) | ) | ||
− | [row3] => Dynarray | + | [row3] => Dynarray (refcnt=1) |
( | ( | ||
[shipperid] => 3 | [shipperid] => 3 | ||
Line 55: | Line 55: | ||
oNULLDATA.mNUMERIC = 0 | oNULLDATA.mNUMERIC = 0 | ||
oNULLDATA.mLOGICAL = .F. | oNULLDATA.mLOGICAL = .F. | ||
− | print_r(oNULLDATA) | + | print_r(oNULLDATA) // or alternatively just echo oNULLDATA |
</code> | </code> | ||
<pre> | <pre> | ||
− | Object (refcnt= | + | Object (refcnt=1) |
( | ( | ||
[mcharacter] => | [mcharacter] => |
Latest revision as of 03:15, 20 June 2010
Purpose
Display object information in a readable format
Syntax
PRINT_R(<object-ref>)
See Also
ACLASS(), ADDPROPERTY(), AMEMBERS(), CLASS, CLASS - Methods, CLASS - Parameters, CLASS - Properties, CLASS - Scoping, COMPOBJ(), CREATEOBJECT(), DEFINE CLASS, DISPLAY CLASSES, DODEFAULT(), FOREACH, LIST CLASSES, LOADOBJECT(), METHOD, NEWOBJECT(), OBJECT(), PRINT_HTML(), PRINT_JSON(), PRINT_XML(), REMOVEPROPERTY(), REQUIRE_ONCE(), SAVEOBJECT(), SQL SELECT, WITH
Description
The PRINT_R() function is used to display information about the specified object, <object-ref>, in a human readable format.
Tip: You can display the same information just by using the "echo objname" command.
Example
open database southwind select * from shippers into object shipobj print_r(shipobj)
Dynarray (refcnt=1) ( [row1] => Dynarray (refcnt=1) ( [shipperid] => 1 [companyname] => Speedy Express [phone] => (503) 555-9831 ) [row2] => Dynarray (refcnt=1) ( [shipperid] => 2 [companyname] => United Package [phone] => (503) 555-3199 ) [row3] => Dynarray (refcnt=1) ( [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) // or alternatively just echo oNULLDATA
Object (refcnt=1) ( [mcharacter] => [mnumeric] => 0 [mlogical] => False )
Products
Recital, Recital Server