Commodore‎ > ‎BASIC‎ > ‎Keywords‎ > ‎

PUDEF

Keyword Abbreviation Token (hex) Version(s) Classification
PUDEF P{Shift+U} DD 3.5, 7.0 Command and Statement
BLOAD B{Shift+L}  DD  4.7  Command and Statement 
PUDEF P{Shift+U} E5 4.7 Command and Statement

  Syntax  
PUDEF logicalChars
 
Parameters Type Legal Value(s) Default Value Note(s)
logicalChars String  1 to 4 chars  ,.$
 
 
  Purpose  
State managment.  Update the USING secret variable (character array).

 
  Remarks  
PUDEF defines the real/actual character to be used in place of the four "logical characters" of PRINT USING.  There are 4 logical characters, set as follows on power-up:
 
Name MID$
position
Default Char Description
blank 1   A "space" used to pad a field 
decimal point 2 . Used to separate integer and fraction parts of a number.
separator 3 , Used to split a "big" number for easier reading. 
monetary symbol 4 $ A "money" sign for displaying currency. 
 
The default values (listed above) are reset whenever CLR is executed (either directly, or indirectly via (D)LOAD / NEW / RUN ).
 
The PUDEF statement does not need to set all 4 logical characters.  See examples.
 
If logicalChars is not a string expression then TYPE MISMATCH ERROR is generated.  Otherwise, if logicalChars has zero or more than four characters then ILLEGAL QUANTITY ERROR is generated.
 
Example:
CLR: PRINT USING "####"; 1
   1

READY.
PUDEF "0"            set the blank logical char to be a zero

READY.
PRINT USING "####"; 1
0001

READY.
   
  Compare With  
 
  See Also  
CLRPRINTUSING  
© H2Obsession, 2014
Comments