Montesquiou wrote:
> Bonjour to all,
> In the archive of the group, I found the word "?PAIRS"
> as in
> : ENDCASE 4 ?PAIRS COMPILE DROP
> BEGIN SP@[EMAIL PROTECTED]
CSP @[EMAIL PROTECTED]
= 0=
> WHILE 2 [COMPILE ENDIF REPEAT
> CSP ! ; IMMEDIATE
> According the FAQ, the ?PAIRS word was FIG-Forth's way of implementing
a
> small amount of syntax checking.
> Is "Number ?PAIRS" similar to ... over <> if (error message) then ...;
More or less, yes. If you can get the fig-FORTH source, it's in Block
40:
: ?ERROR ( BOOLEAN-2 ERROR TYPE-1, WARN FOR TRUE *)
SWAP IF ERROR ELSE DROP ENDIF ;
: ?PAIRS - 13 ?ERROR ; ( VERIFY STACK VALUES ARE PAIRED *)
Andrew.


|