RosettaCodeData/Task/Introspection/Oforth/introspection.fth
2023-07-01 13:44:08 -04:00

12 lines
354 B
Forth

: bloopAbs
| bl m |
System.VERSION println
Word find("bloop") ->bl
bl isA(Constant) ifFalse: [ "bloop constant does not exist" println return ]
"abs" asMethod ->m
m ifNull: [ "abs method does not exist" println return ]
System.Out "bloop value is : " << bl value << cr
System.Out "bloop abs is : " << bl value m perform << cr ;