🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #3308

Re: Problems with Modula-2

#3308
From: Rob van Albada
Date: Mon, 26 Feb 1996 23:13
49 lines
1905 bytes
Do not quite understand your question.
The number and types of the of the parameters should be clear fronm
the DEFINITION module or from your own declaration in your program
module.
e.g.
 PROCEDURE DoSomeThing(VAR s: ARRAY OF CHAR; t: ARRAY OF CHAR,  start,
finish : CARDINAL) : BOOLEAN;
BEGIN
.
.
.
END DoSomeThing;

should be called with two string parameters, two CARDINAL parameters
and as it is a function procedure *returns a BOOLEAN) should be called
as such:

VAR ok : BOOLEAN;
        sentence, aword : str64;
        i, j : CARDINAL;
BEGIN
      ok := DoSomeThing(sentence,aword,i,j);
      IF ok THEN WrStr('Thanks God!'); WrLn;
      ELSE WrStr('You effing computer!!!!!'); WrLn;
      END; (* IF ok *)
END ProgramName;

Et cetera.

Bye,
Rob van Albada
Albada.Ilex@net.hcc.nl

mjk+@osu.edu (M. Klepcyk) wrote:

>Hi,

>I am trying to write a certain program for a class of mine.  However,
>when I go to compile it, it keeps telling me: "The number of actual
>parameters is incorrect."  Could someone please e-mail me with the
>EXACT syntax for passing parameters to functions / procedures and the
>syntax for putting variables, etc. in the procedure header.  I've
>asked my teacher and all he ever gives me is the "What do you think it
>is?" crap and sends me on my way.  I just need someone to tell me the
>basics and I'll be all set.  

>Please advise ( & HURRY :-)

>Thanks in advance!
Technical Details
Message-ID: <4gtep2$53i@altrade.nijmegen.inter.nl.net>
Path: arc1-ca.pugleaf.net!Inter.NL.net!usenet
References: <31316d73.14206122@news-stand.acs.ohio-state.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!Inter.NL.net!usenet
From: Albada.Ilex@net.HCC.nl (Rob van Albada)
Newsgroups: comp.lang.modula2
Subject: Re: Problems with Modula-2
Date: Mon, 26 Feb 1996 23:13:02 GMT
Organization: Inter.NL.net, The Internet Provider in The Netherlands.
Message-ID: <4gtep2$53i@altrade.nijmegen.inter.nl.net>
References: <31316d73.14206122@news-stand.acs.ohio-state.edu>
NNTP-Posting-Host: asp97-24.amsterdam.nl.net
X-Newsreader: Forte Free Agent 1.0.82