Groups | Search | Server Info | Login | Register
Groups > comp.lang.pascal.borland > #207
| From | Robert Prins <robert@prino.org> |
|---|---|
| Newsgroups | comp.lang.pascal.borland |
| Subject | Re: Speeding up code - am I missing something? |
| Date | 2018-09-01 10:08 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <pmdhak$va1$1@dont-email.me> (permalink) |
| References | (2 earlier) <pl4cto$c8b$1@dont-email.me> <pl5r5a$15io$1@gioia.aioe.org> <pl6sok$qvk$1@dont-email.me> <plmg00$v14$1@dont-email.me> <fbcac89f-e7cc-46e8-b899-9eb0993bf988@googlegroups.com> |
On 2018-08-31 16:47, rugxulo@gmail.com wrote:
> Hi,
>
> On Thursday, August 23, 2018 at 9:56:01 AM UTC-5, Robert Prins wrote:
>>
>> One feature sadly missing from Pascal is the fact that PL/I allows you to use
>> '*' as array extents in a called proc, and the (hidden) descriptors that are
>> also passed to it allow you to call the same proc with
>> ...
>
> I don't quite understand what you mean here.
>
>> and a set of builtin functions (lbound and hbound) can be used to retrieve
>> the low and high bounds of the arrays. ;) It's a bit more convoluted to do
>> this with Pascal...
>
> Are you talking about conformant arrays? Schemata? Open arrays?
> Even Turbo Pascal (only later versions?) had LOW() and HIGH() built-ins.
> Is that what you meant?
Not really. or maybe.
Can Pascal (choose your flavour) handle passing these two different arrays of
structures to a single procedure:
dcl 1 s1,
2 s2(2,3),
3 v1 char (12),
3 v2 char (15),
2 s3(4,5),
3 v3 char (19),
3 v4 char (1);
dcl 1 t1,
2 t2(7,8),
3 w1 char (14),
3 w2 char (77),
2 t3(3,3),
3 w3 char (12),
3 w4 char (1);
Well, PL/I can:
myproc: procedure(parm);
dcl 1 parm,
2 p2(*,*),
3 w1 char (*),
3 w2 char (*),
2 s3(*,*),
3 w3 char (*),
3 w4 char (*);
and trying to assign a char(14) to w(1,1) will happily cut off the last two
characters when the procedure is passed s1. And when the SUBSCRIPTRANGE is
enabled, you'll get an error when trying to access w3(4,5) when t1 is passed to
the procedure.
I don't think there's an easy way to do the same with Pascal, but I'm ready to
be corrected.
Robert
--
Robert AH Prins
robert(a)prino(d)org
Back to comp.lang.pascal.borland | Previous | Next — Previous in thread | Next in thread | Find similar
Speeding up code - am I missing something? Robert Prins <robert@nospicedham.prino.org> - 2018-08-15 21:37 +0000
Re: Speeding up code - am I missing something? Peter Flass <peter_flass@nospicedham.yahoo.com> - 2018-08-15 17:52 -0400
Re: Speeding up code - am I missing something? Robert Prins <robert@nospicedham.prino.org> - 2018-08-16 19:51 +0000
Re: Speeding up code - am I missing something? Robert Prins <robert@nospicedham.prino.org> - 2018-08-16 20:38 +0000
Re: Speeding up code - am I missing something? Robert Prins <robert@nospicedham.prino.org> - 2018-08-17 19:20 +0000
Re: Speeding up code - am I missing something? Robert Prins <robert@nospicedham.prino.org> - 2018-08-23 17:21 +0000
Re: Speeding up code - am I missing something? Peter Flass <peter_flass@nospicedham.yahoo.com> - 2018-08-23 11:47 -0400
Re: Speeding up code - am I missing something? rugxulo@gmail.com - 2018-08-31 09:47 -0700
Re: Speeding up code - am I missing something? Robert Prins <robert@prino.org> - 2018-09-01 10:08 +0000
Re: Speeding up code - am I missing something? Marco van de Voort <marcov@toad.stack.nl> - 2018-09-01 11:20 +0000
Re: Speeding up code - am I missing something? rugxulo@gmail.com - 2018-09-03 17:32 -0700
csiph-web