base  ( -- addr )

published: 10 January 2022 / updated 16 February 2022

Lire cette page en français

 

vocabulary: forth

Single precision variable determining the current numerical base.

The BASE variable contains the value 10 (decimal) when FORTH starts.

Example:

DECIMAL     \ select decimal base 
2 BASE !    \ selevt binary base 
 
\ other example 
: GN2 \ ( -- 16 10 ) 
   BASE @ >R HEX BASE @ DECIMAL BASE @ R> BASE ! 
  ; 

Legal: site web personnel sans commerce / personal site without seling