Difference between revisions of "?"
Yvonne.milne (Talk | contribs) |
|||
(8 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
==Purpose== | ==Purpose== | ||
Evaluate expression and output result | Evaluate expression and output result | ||
− | |||
==Syntax== | ==Syntax== | ||
Line 13: | Line 12: | ||
[STYLE <expC3>] | [STYLE <expC3>] | ||
− | |||
==See Also== | ==See Also== | ||
− | [[??]], [[ | + | [[??]], [[ECHO]], [[Lianja|Lianja System Object]], [[SET DEBUGOUT]], [[SET SPACE]], [[TRANSFORM()]], [[WRITEOUTPUT()]] |
− | + | ||
==Description== | ==Description== | ||
The ? command outputs a carriage return, then a line feed, then evaluates each expression in turn and displays the result. The ?? command evaluates the expression and displays the results on the same line, no carriage return/line feed sequence is output. If more than one expression is specified and SET SPACE is ON, a single space is output between each expression. If SET SPACE is OFF, the expressions are output with no space in between. | The ? command outputs a carriage return, then a line feed, then evaluates each expression in turn and displays the result. The ?? command evaluates the expression and displays the results on the same line, no carriage return/line feed sequence is output. If more than one expression is specified and SET SPACE is ON, a single space is output between each expression. If SET SPACE is OFF, the expressions are output with no space in between. | ||
− | + | {| class="wikitable" width="100%" | |
− | {| class="wikitable" | + | !width="20%"|Clause||Description |
− | !Clause||Description | + | |
|- | |- | ||
− | |AT <expN>||You may optionally specify the column at which the expression will be output with the AT <expN> clause. | + | |valign="top"|AT <expN>||You may optionally specify the column at which the expression will be output with the AT <expN> clause. |
|- | |- | ||
− | |PICTURE <expC1>||The PICTURE clause supports all picture template symbols listed in the @...SAY command. | + | |valign="top"|PICTURE <expC1>||The PICTURE clause supports all picture template symbols listed in the @...SAY command. |
|- | |- | ||
− | |FUNCTION <expC2>||The FUNCTION qualifier allows picture functions to be specified. Normally this can be done with the PICTURE qualifier by preceding the picture with '@'. If the FUNCTION qualifier is used the '@' is not needed. | + | |valign="top"|FUNCTION <expC2>||The FUNCTION qualifier allows picture functions to be specified. Normally this can be done with the PICTURE qualifier by preceding the picture with '@'. If the FUNCTION qualifier is used the '@' is not needed. |
|- | |- | ||
− | |STYLE <expC3>||The STYLE qualifier has been added for compatibility with other Xbase languages. | + | |valign="top"|STYLE <expC3>||The STYLE qualifier has been added for compatibility with other Xbase languages. |
|- | |- | ||
|} | |} | ||
+ | From v8.0 the ? > command can be used in server-side Lianja Server Pages in Web Apps to assist in debugging. | ||
+ | |||
+ | Add the [[SET DEBUGOUT|set debugout on]] command to the .rsp script along with ? > statements then open the App in the browser using [[Deploying_to_Local_Directory#Preview_live_in_browser|Preview live in browser]]. The ? > display can then be monitored in the App Builder Console workspace. | ||
+ | |||
+ | The ? > command supports arrays and objects just like the ? command. | ||
==Example== | ==Example== | ||
Line 41: | Line 42: | ||
? "price" at 01 picture "@!",1234.56 picture "$99,999.99" | ? "price" at 01 picture "@!",1234.56 picture "$99,999.99" | ||
PRICE $1,234.56 | PRICE $1,234.56 | ||
− | |||
+ | // Lianja/VFP Server Page (.rsp) example | ||
+ | set debugout on | ||
+ | Lianja.writeoutput("Write this to the debug_server file") | ||
+ | writeOutput("Write this to the App Builder Console workspace") | ||
+ | ? > m_database | ||
+ | ? > _args | ||
+ | set debugout off | ||
+ | </code> | ||
− | |||
− | |||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Commands]] | [[Category:Commands]] | ||
− | [[Category: | + | [[Category:Lianja v8.0]] |
− | + |
Latest revision as of 10:01, 7 July 2022
Contents
Purpose
Evaluate expression and output result
Syntax
? <exp> [,<exp>] | ?? <exp> [,<exp>]
[AT <expN>]
[FUNCTION <expC1>]
[PICTURE <expC2>]
[STYLE <expC3>]
See Also
??, ECHO, Lianja System Object, SET DEBUGOUT, SET SPACE, TRANSFORM(), WRITEOUTPUT()
Description
The ? command outputs a carriage return, then a line feed, then evaluates each expression in turn and displays the result. The ?? command evaluates the expression and displays the results on the same line, no carriage return/line feed sequence is output. If more than one expression is specified and SET SPACE is ON, a single space is output between each expression. If SET SPACE is OFF, the expressions are output with no space in between.
Clause | Description |
---|---|
AT <expN> | You may optionally specify the column at which the expression will be output with the AT <expN> clause. |
PICTURE <expC1> | The PICTURE clause supports all picture template symbols listed in the @...SAY command. |
FUNCTION <expC2> | The FUNCTION qualifier allows picture functions to be specified. Normally this can be done with the PICTURE qualifier by preceding the picture with '@'. If the FUNCTION qualifier is used the '@' is not needed. |
STYLE <expC3> | The STYLE qualifier has been added for compatibility with other Xbase languages. |
From v8.0 the ? > command can be used in server-side Lianja Server Pages in Web Apps to assist in debugging.
Add the set debugout on command to the .rsp script along with ? > statements then open the App in the browser using Preview live in browser. The ? > display can then be monitored in the App Builder Console workspace.
The ? > command supports arrays and objects just like the ? command.
Example
? "price" at 01 picture "@!",1234.56 picture "$99,999.99" PRICE $1,234.56 // Lianja/VFP Server Page (.rsp) example set debugout on Lianja.writeoutput("Write this to the debug_server file") writeOutput("Write this to the App Builder Console workspace") ? > m_database ? > _args set debugout off