[fpc-pascal] Varriable number of parameters

Michael Van Canneyt michael at freepascal.org
Wed May 11 14:20:30 CEST 2005



On Wed, 11 May 2005, Pianoman wrote:

> Hi, how can I create procedure with undefined number of parrameters. Writeln
> is example of what I am looking for for example procedure add(a,b,c,.... var
> result)

If the function must be written in pascal, all you can do is use the
array of const construction:

Function MyFunction(Fmt : STring; Args : Array of const);

Which can be called as
Function MyFunction(A,[B,C,D]);

or

Function MyFunction(A,[D]);

etc.

Michael.


> Pianoman
> ----- Original Message -----
> From: <fpc-pascal-request at lists.freepascal.org>
> To: <fpc-pascal at lists.freepascal.org>
> Sent: Wednesday, May 11, 2005 12:00 PM
> Subject: fpc-pascal Digest, Vol 9, Issue 11
>
>
>> Send fpc-pascal mailing list submissions to
>> fpc-pascal at lists.freepascal.org
>>
>> To subscribe or unsubscribe via the World Wide Web, visit
>> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>> or, via email, send a message with subject or body 'help' to
>> fpc-pascal-request at lists.freepascal.org
>>
>> You can reach the person managing the list at
>> fpc-pascal-owner at lists.freepascal.org
>>
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of fpc-pascal digest..."
>>
>>
>> Today's Topics:
>>
>>    1. Re:  freepascal website programmed in...? (Rimgaudas Laucius)
>>    2. Re:  building docs from cvs (Bob Barry)
>>    3. Re:  building docs from cvs (Marco van de Voort)
>>    4. Re:  building docs from cvs (Michael Van Canneyt)
>>    5. Re:  building docs from cvs (Florian Klaempfl)
>>    6. Re:  building docs from cvs (Marco van de Voort)
>>
>>
>> ----------------------------------------------------------------------
>>
>> Message: 1
>> Date: Tue, 10 May 2005 21:58:52 +0300
>> From: "Rimgaudas Laucius" <rimga at ktl.mii.lt>
>> Subject: Re: [fpc-pascal] freepascal website programmed in...?
>> To: "FPC-Pascal users discussions" <fpc-pascal at lists.freepascal.org>
>> Message-ID: <000901c55592$4ed4eb10$6c2adbc1 at usnis>
>> Content-Type: text/plain; charset="iso-8859-1"
>>
>> Hi,
>>
>> there is nothing curiuos. I also use FPC to program CGI websites. I has
> one
>> advantage: i use Windows in my work and there is almost no need of
>> additional effort to port FPC programs to Linux server.
>>
>>
>> ----- Original Message -----
>> From: "L505" <fpc505 at z505.com>
>> To: <fpc-pascal at lists.freepascal.org>
>> Sent: Tuesday, May 10, 2005 12:34 AM
>> Subject: [fpc-pascal] freepascal website programmed in...?
>>
>>
>>> The freepascal.org website and community is programmed in....
> CGI/pascal?
>>> ;-)
>>>
>>> curious...
>>> Lars
>>>
>>>
>>> _______________________________________________
>>> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
>>> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>>
>>
>>
>>
>> ------------------------------
>>
>> Message: 2
>> Date: Wed, 11 May 2005 09:48:11 +0200
>> From: Bob Barry <bobb at absamail.co.za>
>> Subject: Re: [fpc-pascal] building docs from cvs
>> To: Michael.VanCanneyt at Wisa.be
>> Cc: FPC-Pascal users discussions <fpc-pascal at lists.freepascal.org>
>> Message-ID: <200505110948.11378.bobb at absamail.co.za>
>> Content-Type: text/plain;  charset="us-ascii"
>>
>> Michael -
>>
>> On Sun, 8 May 2005 11:25 you wrote:
>>>> But ps and pdf still don't compile.
>>> Strange, because I did a 'make alldist' yesterday and uploaded all
>>> docs for the 2.0 release. All is committed and tagged.
>>
>> Compilation of pdf and ps fail for me, but it looks like the fault is in
> using
>> out-of-the-box setup of tetex..  It might be a good idea to test the
> relevant
>> parameter at start of compilation, and if value is inadequate then exit
> with
>> a message suggesting what to do about it.
>>
>> Pdf compilation fails with:
>>    LaTeX Warning: Reference `rtl:x86:readportw' on page 1283 undefined on
> input li
>>    ne 79730.
>>
>>    ) [1283] (./rtl.aux
>>    ! TeX capacity exceeded, sorry [save size=5000].
>>    \@newl at bel ...dafter \ifx \csname #1@#2\endcsname
>>                                                      \reserved at a \else
> \@tempsw...
>>    l.8883 ...213}{Types\relax }{subsection.31.2.2}{}}
>>
>>    !  ==> Fatal error occurred, the output PDF file is not finished!
>>    Transcript written on rtl.log.
>>    make: *** [rtl.pdf] Error 1
>>    make: Leaving directory `/home/bobb/freepascal/cvs/fpc/docs'
>>
>> Similarly, compilation of ps fails with:
>>    LaTeX Warning: Reference `rtl:x86:readportw' on page 1292 undefined on
> input li
>>    ne 79730.
>>
>>    ) [1292] (./rtl.aux
>>    ! TeX capacity exceeded, sorry [save size=5000].
>>    \@newl at bel ...dafter \ifx \csname #1@#2\endcsname
>>                                                      \reserved at a \else
> \@tempsw...
>>    l.8883 ...222}{Types\relax }{subsection.31.2.2}{}}
>>
>>    Output written on rtl.dvi (1293 pages, 7460520 bytes).
>>    Transcript written on rtl.log.
>>    make: *** [rtl.dvi] Error 1
>>    make: Leaving directory `/home/bobb/freepascal/cvs/fpc/docs'
>>
>> Thanks,
>>
>> Bob
>>
>>
>>
>> ------------------------------
>>
>> Message: 3
>> Date: Wed, 11 May 2005 09:51:25 +0200 (CEST)
>> From: marcov at stack.nl (Marco van de Voort)
>> Subject: Re: [fpc-pascal] building docs from cvs
>> To: bobb at absamail.co.za, FPC-Pascal users discussions
>> <fpc-pascal at lists.freepascal.org>
>> Message-ID: <20050511075125.377061CCEE at turtle.stack.nl>
>> Content-Type: text/plain; charset=US-ASCII
>>
>>> On Sun, 8 May 2005 11:25 you wrote:
>>>>> But ps and pdf still don't compile.
>>>> Strange, because I did a 'make alldist' yesterday and uploaded all
>>>> docs for the 2.0 release. All is committed and tagged.
>>>
>>> Compilation of pdf and ps fail for me, but it looks like the fault is in
> using
>>> out-of-the-box setup of tetex..  It might be a good idea to test the
> relevant
>>> parameter at start of compilation, and if value is inadequate then exit
> with
>>> a message suggesting what to do about it.
>>
>> If you know how :_)
>>
>> Anyway, in texmf.conf you need to up some of the limits. The default
> values
>> are too tight.
>>
>>
>>
>>
>> ------------------------------
>>
>> Message: 4
>> Date: Wed, 11 May 2005 10:13:41 +0200 (Romance Daylight Time)
>> From: Michael Van Canneyt <michael at freepascal.org>
>> Subject: Re: [fpc-pascal] building docs from cvs
>> To: FPC-Pascal users discussions <fpc-pascal at lists.freepascal.org>
>> Message-ID: <Pine.WNT.4.62.0505111011550.4092 at gru.wisa.be>
>> Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
>>
>>
>>
>> On Wed, 11 May 2005, Marco van de Voort wrote:
>>
>>>> On Sun, 8 May 2005 11:25 you wrote:
>>>>>> But ps and pdf still don't compile.
>>>>> Strange, because I did a 'make alldist' yesterday and uploaded all
>>>>> docs for the 2.0 release. All is committed and tagged.
>>>>
>>>> Compilation of pdf and ps fail for me, but it looks like the fault is
> in using
>>>> out-of-the-box setup of tetex..  It might be a good idea to test the
> relevant
>>>> parameter at start of compilation, and if value is inadequate then exit
> with
>>>> a message suggesting what to do about it.
>>>
>>> If you know how :_)
>>>
>>> Anyway, in texmf.conf you need to up some of the limits. The default
> values
>>> are too tight.
>>
>> Exactly.
>>
>> set
>>
>> save_size=10000
>>
>> in texmf.conf
>>
>> Normally, you can also do it via an environment variable.
>>
>> export save_size=10000
>> pdflatex rtl.tex
>>
>> I have received a fix for the makefiles, which I received from the Debian
> devels.
>> I'll see about applying it tonight.
>>
>> Michael.
>>
>>
>>
>> ------------------------------
>>
>> Message: 5
>> Date: Wed, 11 May 2005 10:24:16 +0200
>> From: Florian Klaempfl <florian at freepascal.org>
>> Subject: Re: [fpc-pascal] building docs from cvs
>> To: bobb at absamail.co.za, FPC-Pascal users discussions
>> <fpc-pascal at lists.freepascal.org>
>> Message-ID: <4281C130.1050005 at freepascal.org>
>> Content-Type: text/plain; charset=us-ascii
>>
>> Bob Barry wrote:
>>
>>> Michael -
>>>
>>> On Sun, 8 May 2005 11:25 you wrote:
>>>
>>>>> But ps and pdf still don't compile.
>>>>
>>>> Strange, because I did a 'make alldist' yesterday and uploaded all
>>>> docs for the 2.0 release. All is committed and tagged.
>>>
>>>
>>> Compilation of pdf and ps fail for me, but it looks like the fault is in
> using
>>> out-of-the-box setup of tetex..  It might be a good idea to test the
> relevant
>>> parameter at start of compilation, and if value is inadequate then exit
> with
>>> a message suggesting what to do about it.
>>
>> The problem is that the fpc docs are huge and that the default values of
> some
>> TeX distribtions are too small. I don't know if these values can be tested
>> inside a TeX file.
>>
>>>
>>> Pdf compilation fails with:
>>>    LaTeX Warning: Reference `rtl:x86:readportw' on page 1283 undefined
> on input li
>>>    ne 79730.
>>>
>>>    ) [1283] (./rtl.aux
>>>    ! TeX capacity exceeded, sorry [save size=5000].
>>>    \@newl at bel ...dafter \ifx \csname #1@#2\endcsname
>>>                                                      \reserved at a \else
> \@tempsw...
>>>    l.8883 ...213}{Types\relax }{subsection.31.2.2}{}}
>>>
>>>    !  ==> Fatal error occurred, the output PDF file is not finished!
>>>    Transcript written on rtl.log.
>>>    make: *** [rtl.pdf] Error 1
>>>    make: Leaving directory `/home/bobb/freepascal/cvs/fpc/docs'
>>>
>>> Similarly, compilation of ps fails with:
>>>    LaTeX Warning: Reference `rtl:x86:readportw' on page 1292 undefined
> on input li
>>>    ne 79730.
>>>
>>>    ) [1292] (./rtl.aux
>>>    ! TeX capacity exceeded, sorry [save size=5000].
>>>    \@newl at bel ...dafter \ifx \csname #1@#2\endcsname
>>>                                                      \reserved at a \else
> \@tempsw...
>>>    l.8883 ...222}{Types\relax }{subsection.31.2.2}{}}
>>>
>>>    Output written on rtl.dvi (1293 pages, 7460520 bytes).
>>>    Transcript written on rtl.log.
>>>    make: *** [rtl.dvi] Error 1
>>>    make: Leaving directory `/home/bobb/freepascal/cvs/fpc/docs'
>>>
>>> Thanks,
>>>
>>> Bob
>>>
>>> _______________________________________________
>>> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
>>> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>>
>>
>>
>>
>> ------------------------------
>>
>> Message: 6
>> Date: Wed, 11 May 2005 10:35:24 +0200 (CEST)
>> From: marcov at stack.nl (Marco van de Voort)
>> Subject: Re: [fpc-pascal] building docs from cvs
>> To: FPC-Pascal users discussions <fpc-pascal at lists.freepascal.org>
>> Message-ID: <20050511083524.018631CCEE at turtle.stack.nl>
>> Content-Type: text/plain; charset=US-ASCII
>>
>>> Normally, you can also do it via an environment variable.
>>>
>>> export save_size=10000
>>> pdflatex rtl.tex
>>>
>>> I have received a fix for the makefiles, which I received from the
> Debian devels.
>>> I'll see about applying it tonight.
>>
>> Added to
>>
>> http://www.freepascal.org/wiki/index.php/Release_engineering
>>
>>
>>
>> ------------------------------
>>
>> _______________________________________________
>> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
>> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>>
>>
>> End of fpc-pascal Digest, Vol 9, Issue 11
>> *****************************************
>>
>>
>>
>> __________ Informacia od NOD32 1.1092 (20050510) __________
>>
>> Tato sprava bola preverena antivirusovym systemom NOD32.
>> http://www.eset.sk
>>
>>
>
>
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>




More information about the fpc-pascal mailing list