$Unblank

From m204wiki
Revision as of 15:26, 31 July 2014 by Mlarocca (talk | contribs) (Mlarocca moved page $UNBLANK to $Unblank: Lower case change)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The $UNBLANK function returns the contents of an argument, removing leading and trailing blanks, and compressing multiple embedded blanks to one blank character. $UNBLANK is useful in conjunction with $READ. The user can respond to prompts for retrievals or comparisons in free form, without regard for leading, trailing, or embedded blanks. See the second example.

Example 1

$UNBLANK(' JOHN JONES ') equals 'JOHN JONES' $UNBLANK('WASH., D.C.') equals 'WASH., D.C.'

Example 2

BEGIN %A = $UNBLANK($READ('ENTER VALUE')) FIND.RECS: FIND ALL RECORDS FOR WHICH FIELD = %A END FIND . . .