Re: Untyped variables of a function
holyghost <[email protected]> Fri, 24 Sep 2021 05:16:23 +0200
| Newsgroups | alt.comp.lang.pascal |
|---|---|
| Organization | Brandywine Software |
| Message-ID | <[email protected]> |
On 9/2/2021 8:05 AM, F. W. wrote:
> Am 02.09.2021 um 00:53 schrieb Shadow:
>
>>> Pascal has strong types. Is it anyhow possible to define a parameter
>>> of a function or procedure that allows passing variables of any type?
>
>> I discovered that to get help here you have to describe exactly what
>> you are trying to do. No, the group is not dead. What sort of function
>> would have to accept any kind of variable? []'s
>
> I wanted to imitate the printf-function of c in Pascal.
>
> void printf (char *format, ...)
>
> That was one of the advantages of Pascal against Modula-2. There was no
> flexible WRITE/WRITELN-Procedure in M2.
>
> VAR a: INTEGER; b: CHAR; c: STRING;
>
> Modula-2:
>
> IO.WrStr ('Hello');
> IO.WrInt (a);
> IO.WrStr (b);
> IO.WrStr (c);
>
> Pascal:
>
> WRITELN ('Hello', a, b, c);
>
> FW
Which PASCAL are you in ?
--
(__)
oo )
|_/\
My Software & Art company (donations are welcome) :
https://ko-fi.com/brandywine9