Treatment of parameter-less procedure type in ORP.Mod.txt
Dear All, I think ORP.Mod.txt missed to make ptype.nofpar := 0; in PROCEDURE ProcedureType() for parameter-less procedure types... Such as: TYPE Command* = PROCEDURE; BEGIN body (*initialize module*) END Not sure how Oberon compiler manages to get nofpar = 0! Or, I am missing it somewhere? Or, is there a chance of any memory chunk pre-initialized to 0 in Oberon? With thanks and best regards, Yours sincerely, Srinivas Nayak Home: http://www.mathmeth.com/sn/ Blog: http://srinivas-nayak.blogspot.in/
-----Original Message----- From: Oberon [mailto:oberon-bounces@lists.inf.ethz.ch] On Behalf Of Srinivas Nayak Sent: Saturday, 9 July 2016 10:26 PM To: ETH Oberon and related systems Subject: [Oberon] Treatment of parameter-less procedure type in ORP.Mod.txt
Dear All,
I think ORP.Mod.txt missed to make ptype.nofpar := 0; in PROCEDURE ProcedureType() for parameter-less procedure types...
Such as:
TYPE Command* = PROCEDURE; BEGIN body (*initialize module*) END
Not sure how Oberon compiler manages to get nofpar = 0! Or, I am missing it somewhere? Or, is there a chance of any memory chunk pre-initialized to 0 in Oberon?
ptype is a pointer variable of type ORB.Type. Pointer variables are automatically initialised to zero when created using NEW. This initialisation is performed by the procedure Kernel.New. Regards, Chris Burrows CFB Software http://www.astrobe.com
Ahhh... New() is the saviour then... With thanks and best regards, Yours sincerely, Srinivas Nayak Home: http://www.mathmeth.com/sn/ Blog: http://srinivas-nayak.blogspot.in/ On 07/09/2016 08:04 PM, Chris Burrows wrote:
-----Original Message----- From: Oberon [mailto:oberon-bounces@lists.inf.ethz.ch] On Behalf Of Srinivas Nayak Sent: Saturday, 9 July 2016 10:26 PM To: ETH Oberon and related systems Subject: [Oberon] Treatment of parameter-less procedure type in ORP.Mod.txt
Dear All,
I think ORP.Mod.txt missed to make ptype.nofpar := 0; in PROCEDURE ProcedureType() for parameter-less procedure types...
Such as:
TYPE Command* = PROCEDURE; BEGIN body (*initialize module*) END
Not sure how Oberon compiler manages to get nofpar = 0! Or, I am missing it somewhere? Or, is there a chance of any memory chunk pre-initialized to 0 in Oberon?
ptype is a pointer variable of type ORB.Type. Pointer variables are automatically initialised to zero when created using NEW. This initialisation is performed by the procedure Kernel.New.
Regards,
Chris Burrows CFB Software http://www.astrobe.com
-- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
You're right. The statement "ptype.nofpar := nofpar" should be taken out of the IF and be put just before the end of the procedure. But luckily, ptype is filled with 0 by NEW :-) Jörg
Am 09.07.2016 um 14:55 schrieb Srinivas Nayak <sinu.nayak2001@gmail.com>:
Dear All,
I think ORP.Mod.txt missed to make ptype.nofpar := 0; in PROCEDURE ProcedureType() for parameter-less procedure types...
Such as:
TYPE Command* = PROCEDURE; BEGIN body (*initialize module*) END
Not sure how Oberon compiler manages to get nofpar = 0! Or, I am missing it somewhere? Or, is there a chance of any memory chunk pre-initialized to 0 in Oberon?
With thanks and best regards,
Yours sincerely, Srinivas Nayak
Home: http://www.mathmeth.com/sn/ Blog: http://srinivas-nayak.blogspot.in/ -- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
I think, if we remove 0 filling from NEW, many such hidden cases would come out... With thanks and best regards, Yours sincerely, Srinivas Nayak Home: http://www.mathmeth.com/sn/ Blog: http://srinivas-nayak.blogspot.in/ On 07/10/2016 11:39 AM, Jörg Straube wrote:
You're right. The statement "ptype.nofpar := nofpar" should be taken out of the IF and be put just before the end of the procedure. But luckily, ptype is filled with 0 by NEW :-)
Jörg
Am 09.07.2016 um 14:55 schrieb Srinivas Nayak <sinu.nayak2001@gmail.com>:
Dear All,
I think ORP.Mod.txt missed to make ptype.nofpar := 0; in PROCEDURE ProcedureType() for parameter-less procedure types...
Such as:
TYPE Command* = PROCEDURE; BEGIN body (*initialize module*) END
Not sure how Oberon compiler manages to get nofpar = 0! Or, I am missing it somewhere? Or, is there a chance of any memory chunk pre-initialized to 0 in Oberon?
With thanks and best regards,
Yours sincerely, Srinivas Nayak
Home: http://www.mathmeth.com/sn/ Blog: http://srinivas-nayak.blogspot.in/ -- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
-- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
participants (3)
-
Chris Burrows -
Jörg Straube -
Srinivas Nayak