$Unblank

From m204wiki
(Redirected from $UNBLANK)
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 . . .