Re: [BLACKBOX] Variable IN parameters !

From: [at]} <Chris>
Date: Fri, 10 Aug 2012 06:47:56 +0930

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

> -----Original Message-----
> From: BlackBox [mailto:BLACKBOX{([at]})nowhere.xy
> Iljin
> Sent: Friday, 10 August 2012 12:23 AM
> To: BLACKBOX{([at]})nowhere.xy
> Subject: Re: [BLACKBOX] Variable IN parameters !
>
> Hello!
>
> Is it even possible to declare a receiver variable as IN instead of VAR?
>

Yes (I had to look it up to make sure as well!):

CP Language Reference Section 10.2:

--------------

  Receiver = "(" [VAR | IN] ident ":" ident ")".

--------------

It does make a difference as the following results in a compile-time error:

  PROCEDURE (IN box : Box) Salt, NEW;
    BEGIN
      box.k := 5
    END Salt;

Regards,
Chris



----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-1517512817_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGZiaWRpcyBcZGVmZjB7XGZvbnR0YmwN
CntcZjBcZnN3aXNzIEFyaWFsO30NCntcZjFcZm1vZGVybiBDb3VyaWVyIE5ldzt9DQp7XGYyXGZu
aWxcZmNoYXJzZXQyIFN5bWJvbDt9DQp7XGYzXGZtb2Rlcm5cZmNoYXJzZXQwIENvdXJpZXIgTmV3
O319DQp7XGNvbG9ydGJsXHJlZDBcZ3JlZW4wXGJsdWUwO1xyZWQwXGdyZWVuMFxibHVlMjU1O30N
Clx1YzFccGFyZFxwbGFpblxkZWZ0YWIzNjAgXGYwXGZzMjAgPiAtLS0tLU9yaWdpbmFsIE1lc3Nh
Z2UtLS0tLVxwYXINCj4gRnJvbTogQmxhY2tCb3ggW21haWx0bzpCTEFDS0JPWEBMSVNUUy5PQkVS
T04uQ0hdIE9uIEJlaGFsZiBPZiBBbGV4YW5kZXJccGFyDQo+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HRvIExJU1RTRVJWQExJU1RTLk9C
RVJPTi5DSFx9fQBoBAA=
----boundary-LibPST-iamunique-1517512817_-_---
Received on Thu Aug 09 2012 - 23:17:56 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:29:59 UTC