$Unblank

From m204wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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 . . .