DataBasic Reference > DataBasic Objects > DataBasic Server Objects Operations > Access Data in an Object

Comment on this topic

Documentation Comments

Use this form to comment on this topic. You can also provide any general observations about the Online Documentation, or request that additional information be added in a future release.

RealityV15.1Online Documentation (MoTW) Revision 7

Access Data in an Object (dbo_access-data_in_object.htm)

To

Reality

Version

Topic

Submitted by

Company

Location

Email address

Comment

 

 

Access Data in an Object

Data is held in an object within fields. Depending on the object definition, this data may be directly accessible using the -> operator.

Assignment Syntax

Object -> field = expression

Expression Syntax

Object -> field

Syntax Elements

Object DBO variable name.
field The object field name being accessed.
-> The object operator.
expression Any DataBasic expression that produces a result suitable to be assigned to field.

Comments

As Object -> field is an expression, it can be used in place of a single element within a DataBasic statement.

Examples

Font->Style = "bold"

Set the Style field in the Font object to the string "bold".

Var = Object-> Field

Extract the Field element from Object and save it in Var.

CALL SUBROUTINE( Object -> Field, P2)

Extract the Field element from Object and pass it as first parameter of the call to the subroutine "SUBROUTINE".

A = B + Object -> Field * Object-> Field

Use the content of the Field element in an arithmetic expression.

A = Object->Field -> Field2

Extract the contents of Field2 from the object Field in the object Object.

RealityV15.1 (MoTW) Revision 7Comment on this topic