Pic$: Difference between revisions
No edit summary |
No edit summary |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
PIC$[(<currency symbol>)] | |||
The '''Pic$''' [[internal function]] by itself returns the current currency symbol. Used with | 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==== | ====Comments and Examples==== | ||
Line 23: | Line 23: | ||
====Related Functions==== | ====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. | 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 (Internal Function)|DATE]] functions. | ||
====Technical Considerations==== | ====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. | 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.<BR> | ||
2. Some European customers may want to include this function in a procedure executed when starting Business Rules. | 2. Some European customers may want to include this function in a procedure executed when starting Business Rules.<BR> | ||
For example, the command that starts Business Rules could be: | For example, the command that starts Business Rules could be: | ||
Line 39: | Line 39: | ||
RUN MENU | RUN MENU | ||
3. On a multi-user system, changing the currency symbol at one workstation has no effect on other workstations. | 3. On a multi-user system, changing the currency symbol at one workstation has no effect on other workstations.<BR> | ||
4. The string argument A$ must be exactly one character long when the syntax PIC$(A$) is used to change the currency symbol. | 4. The string argument A$ must be exactly one character long when the syntax PIC$(A$) is used to change the currency symbol.<BR> | ||
<noinclude> | <noinclude> | ||
[[Category:Internal Functions]] | [[Category:Internal Functions]] | ||
</noinclude> | </noinclude> |
Latest revision as of 17:40, 22 May 2014
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.