Demonstrates converting a numerical value into a string and concatenating it to another string to form a note.
The GPAs &FTYPE, &DDECPL and &DENOM are used to control the output of DFSTR as well as dimension statements.
$$
$$ Declarations
$$
STRING/DPSTR(10),FRSTR(10)
$$
$$ Numeric Definition
$$
D1=170.126
$$
$$ String Convention
$$
&FTYPE=&DECIM$$ SET DIM. TO DECIMAL PLACES
&DDECPL=5$$ SET DECIMAL PLACES TO 5
DPSTR=DFSTR(D1)$$ CREATE DECIMAL STRING
&FTYPE=&TQFRAC$$ SET DIM. TO FRACTIONAL
&DENOM=16$$ SET MAX. DENOMINATOR TO 16
FRSTR=DFSTR(D1)$$ CREATE FRACTIONAL STRING
$$
$$ Text Display
$$
PRINT/'DPSTR=' +DPSTR+', FRSTR='+FRSTR
$$
$$ Create Note
$$
NOTE/0,0,'DPSTR=' +DPSTR, 'FRSTR='+FRSTR
The output on the listing device would be:
DPSTR=170.12600, FRSTR=170<Q1!8>
Note Created by Example of DFSTR