All pastes #155225 Raw Edit

Miscellany

public text v1 · immutable
#155225 ·published 2006-08-30 22:20 UTC
rendered paste body
: postpone2 ( "name" -- )
  bl word find ?dup
  if  swap  [compile] cliteral
    0< if  ['] compile,  else  ['] execute  then  compile,
  else  drop  -13 throw  then ;  immediate

: postpone3 ( "name" -- )
  bl word find dup 0= -13 and throw
  0< if  [compile] cliteral  ['] compile,  then  compile, ; immediate

: my-if1 postpone if ; immediate
: my-if2 postpone2 if ; immediate
: my-if3 postpone3 if ; immediate

: my-dup1 postpone dup ; immediate
: my-dup2 postpone2 dup ; immediate
: my-dup3 postpone3 dup ; immediate

' my-if1 see  
  0x8068290: using if (0x8064588)
  0x8068294: using exit (0x8063008)
' my-if2 see
  0x80682e8: using (clit) (0x8064d48)
  0x80682ec: using if (0x8064588)
  0x80682f0: using execute (0x8065b58)
  0x80682f4: using exit (0x8063008)
' my-if3 see
  0x8069300: using if (0x8064588)
  0x8069304: using exit (0x8063008)
' my-dup1 see
  0x8069310: using (clit) (0x8064d48)
  0x8069314: using dup (0x8063048)
  0x8069318: using compile, (0x8066920)
  0x806931c: using exit (0x8063008)
' my-dup2 see
  0x8069328: using (clit) (0x8064d48)
  0x806932c: using dup (0x8063048)
  0x8069330: using compile, (0x8066920)
  0x8069334: using exit (0x8063008)
' my-dup3 see
  0x8069340: using (clit) (0x8064d48)
  0x8069344: using dup (0x8063048)
  0x8069348: using compile, (0x8066920)
  0x806934c: using exit (0x8063008)