Pic$

From BR Wiki
Jump to navigation Jump to search
PIC$[(<currency symbol>)]

The Pic$ internal function by itself returns the current currency symbol. Used with optional 'currency symbol' parameter, it defines a new currency symbol.

Comments and Examples

00010 PRINT "The currency symbol is ";PIC$
00020 PRINT USING 30: 12.34
00030 FORM PIC($$$$.##)
00040 PRINT "The new currency symbol is ";PIC$("#")
00050 PRINT USING 30: 12.34

The output from running the above program, assuming the default for PIC$ was not changed since starting Business Rules, would be:

The currency symbol is $

  $12.34

The new currency symbol is #

  #12.34

Related Functions

For other features especially useful in markets outside the United States, see the INVP parameter of the OPTION statement and the optional format string in the DATE$ and DATE functions.

Technical Considerations

1. After using PIC$(A$) to change the currency symbol, it will stay changed until you exit Business Rules , or until another PIC$(A$) function is executed to change it again.
2. Some European customers may want to include this function in a procedure executed when starting Business Rules.

For example, the command that starts Business Rules could be:

BR "proc start"

and the procedure file START could include:

PIC$("#")
RUN MENU

3. On a multi-user system, changing the currency symbol at one workstation has no effect on other workstations.
4. The string argument A$ must be exactly one character long when the syntax PIC$(A$) is used to change the currency symbol.