Passing objects to subroutines

1 view
Skip to first unread message

Gary

unread,
Jul 23, 2009, 2:59:29 PM7/23/09
to OpenQM-OpenSource
Can anyone tell me if this is possible? If I can do this, I can
generate some REALLY impressive code :-) As a teaser, I'm writing a
new OO screen handling system that should blow !SCREEN() away... I
can probably work around this, but my job would be GREATLY simplifies
if I could pass objects around. I DON'T want to pass members around, I
need to pass entire objects, e.g.

A=OBJECT("some.cls")
SUB1(A)
...

Gary

Gary

unread,
Jul 23, 2009, 3:13:19 PM7/23/09
to OpenQM-OpenSource
Please ignore previous message! :-) A little testing shows that this
is INDEED doable!

Gary

Gary

unread,
Jul 23, 2009, 3:16:35 PM7/23/09
to OpenQM-OpenSource
Here's a new question... Is there a "base" class for all objects? If
so, what method(s) are there? It would be nice if there would be some
facility for object inspection/querying, serialization (marshaling),
etc. For example, in the above instance (passing an object to a
subroutine, it would be nice to be able to get the class name to find
what KIND of object you're about to manipulate.

Gary

Glen Batchelor

unread,
Jul 23, 2009, 3:38:49 PM7/23/09
to openqm-o...@googlegroups.com
No, one can be created though.

Glen.mobile
RewriteRule ^(garbage|junk)$ /$1 [NC,L]

Ashley Chapman

unread,
Jul 23, 2009, 3:52:18 PM7/23/09
to openqm-o...@googlegroups.com
Here's a new question... Is there a "base" class for all objects?  If
so, what method(s) are there?  It would be nice if there would be some
facility for object inspection/querying, serialization (marshaling),
etc.  For example, in the above instance (passing an object to a
subroutine, it would be nice to be able to get the class name to find
what KIND of object you're about to manipulate.

Some sort of reflection mechanism should be fairly simple to put together.  We have ALL the source code.   Serialisation should also be possible, as the class members are just compiled into pseudo code for the run-machine.  Just like Java.

Go for it!  I'm hugely over-run with other commitments, otherwise I would offer to help out with any C/C++ coding.



Ashley Chapman
Reply all
Reply to author
Forward
0 new messages