RosettaCodeData/Task/Send-an-unknown-method-call/Forth/send-an-unknown-method-call.fth

11 lines
289 B
Forth
Raw Permalink Normal View History

2015-11-18 06:14:39 +00:00
include FMS-SI.f
include FMS-SILib.f
var x \ instantiate a class var object named x
2017-09-23 10:01:46 +02:00
\ Use a standard Forth string and evaluate it.
\ This is equivalent to sending the !: message to object x
42 x s" !:" evaluate
2015-11-18 06:14:39 +00:00
2017-09-23 10:01:46 +02:00
x p: 42 \ send the print message ( p: ) to x to verify the contents