Difference between revisions of "SET PCPICTURE"

From Recital Documentation Wiki
Jump to: navigation, search
Line 25: Line 25:
 
num = 34.675
 
num = 34.675
 
set pcpicture on
 
set pcpicture on
@ 0,0 say num picture 99.9
+
@ 0,0 say num picture "99.9"
 
       34.6
 
       34.6
 
set pcpicture off
 
set pcpicture off
@ 0,0 say num picture 99.9
+
@ 0,0 say num picture "99.9"
 
       34.7</code>
 
       34.7</code>
  

Revision as of 10:45, 12 March 2009

SET PCPICTURE

Class

Xbase Compatibility


Purpose

Truncate extra decimal places for dBASE compatibility


Syntax

SET PCPICTURE ON | OFF | (<expL>)


See Also

@...SAY, APPEND, CHANGE, CREATE SCREEN, EDIT, MODIFY SCREEN, CEILING(), EDITFIELD(), FILETYPE(), FLOOR(), FMT(), INDEXEXT(), ROUND(), SET CLIPPER, SET CLIPPER5, SET COMPATIBLE, SET EDITFIELD, SET FILECASE, SET FILETYPE, SET FORMAT, SET INDEXEXT, SET MEMOEXT, SET PCEDIT, SET PCEXACT, SET PCFILTER, SET PCGRAPHICS, SET PCKEYS, SET PCLOCKING, SET PCSAYS, SET PCUNIQUE, DB_FOXPLUSBUGS, DB_FOXPROKEYS, DB_SAMBA


Description

The SET PCPICTURE command allows for dBASE compatibility with the handling of the decimal portion of numeric data in picture statements. When PCPICTURE is set ON, if a picture statement has fewer decimal places than the actual variable or field, the extra decimal places are truncated. If PCPICTURE is OFF, then the numeric data is properly rounded. This command has been added to aid in the porting of applications that use this feature. By default, PCPICTURE is OFF.


Example

num = 34.675
set pcpicture on
@ 0,0 say num picture "99.9"
      34.6
set pcpicture off
@ 0,0 say num picture "99.9"
      34.7


Products

Recital Database Server, Recital Mirage Server, Recital Terminal Developer