- Anonymous Types

From: CFB Software <"CFB>
Date: Wed, 2 Mar 2005 15:00:35 +1030

----boundary-LibPST-iamunique-1808026603_-_-
Content-type: text/plain

As anonymous arrays cannot be of any use as procedure parameters it
would be helpful to novices if BlackBox reported an error (or warning at
least). I checked the behaviour of Gardens Point Component Pascal with
the same code sample and it does in fact give a warning:

warning : The anonymous array type is incomptible with all values

Chris Burrows
CFB Software
http://www.cfbsoftware.com/gpcp

> -----Original Message-----
> From: blackbox{([at]})nowhere.xy
> Behalf Of H. v. L.
> Sent: Tuesday, 1 March 2005 5:17 PM
> To: BlackBox Mailing List
> Subject: [BlackBox] - Anonymous Types
>
>
> > MODULE PrivTest;
> >

> > PROCEDURE ^ Test (VAR ident: ARRAY 10 OF INTEGER);
> >
> > PROCEDURE Test (VAR ident: ARRAY 10 OF INTEGER);
> > BEGIN
> > END Test;

> >
> > END PrivTest.
>
> In my opinion not allowing formal parameters with fixed
> length anonymous
> types is quite reasonable - and is clearly stated in the
> language report.
> To the compiler the VARs ident and ident are of different
> type. Procedure
> Test will not accept *any* actual parameter of what type ever, the
> programmer has to provide an explicitly compatible type,
> either by naming
> it or - in the case of a formal parameter like above - by
> using an open
> pointer type which is compatible with any array of its base type.
>
> Regards
>
> Harro
>
> --- BlackBox
> --- send subject HELP or UNSUBSCRIBE to blackbox{([at]})nowhere.xy
>
>

--- BlackBox
--- send subject HELP or UNSUBSCRIBE to blackbox{([at]})nowhere.xy



----boundary-LibPST-iamunique-1808026603_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"

e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3Vy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FyDQo+IHBvaW50ZXIgdHlwZSB3aGljaCBpcyBjb21w
YXRpYmxlIHdpdGggYW55IGFycmF5IG9mIGl0cyBiYXNlIHR5cGUuXHBhcg0KPiBccGFyDQo+IFJl
Z2FyZHNccGFyDQo+IFxwYXINCj4gSGFycm9ccGFyDQo+IFxwYXINCj4gLS0tIEJsYWNrQm94XHBh
cg0KPiAtLS0gc2VuZCBzdWJqZWN0IEhFTFAgb3IgVU5TVUJTQ1JJQkUgdG8gYmxhY2tib3hAb2Jl
cm9uLmNoXHBhcg0KPiBccGFyDQo+IFxwYXINClxwYXINCi0tLSBCbGFja0JveFxwYXINCi0tLSBz
ZW5kIHN1YmplY3QgSEVMUCBvciBVTlNVQlNDUklCRSB0byBibGFja2JveEBvYmVyb24uY2hccGFy
DQpccGFyDQp9


----boundary-LibPST-iamunique-1808026603_-_---
Received on Wed Mar 02 2005 - 05:30:35 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:28:22 UTC