Re: [BLACKBOX] Type transfer

From: [at]} <Robert>
Date: Fri, 14 Oct 2011 13:26:18 +0100

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

Yes, but ....

What I want to do is

   r := n * n

and if I don't convert before the assignment I risk overflow.

Cheers

Robert


On 14/10/2011 12:30 PM, Rene A. Krywult wrote:
> MODULE PrivConv;
> VAR r:REAL; n:INTEGER;
> BEGIN
> n:=5;
> r:=n;
> END PrivConv.
>
> -------- Original-Nachricht --------
>> Datum: Fri, 14 Oct 2011 12:23:29 +0100
>> Von: "Campbell, Robert (SELEX GALILEO, UK)"<robert.d.campbell{([at]})nowhere.xy
>> An: BLACKBOX{([at]})nowhere.xy
>> Betreff: [BLACKBOX] Type transfer
>> My mind has suddenly gone blank!
>>
>>
>> What is the easiest way of converting an INTEGER (say n) to a REAL?
>>
>> The expression "(n + 0.)" just seems a bit unnatural.
>>
>>
>> Cheers
>>
>> Robert
>> SELEX Galileo Ltd
>> Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex
>> SS14 3EL
>> A company registered in England& Wales. Company no. 02426132
>> ********************************************************************
>> This email and any attachments are confidential to the intended
>> recipient and may also be privileged. If you are not the intended
>> recipient please delete it from your system and notify the sender.
>> You should not copy it or use it for any purpose nor disclose or
>> distribute its contents to any other person.
>> ********************************************************************
>>
>>
>> ----
>> To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to
>> LISTSERV{([at]})nowhere.xy


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-1685673045_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTe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c2Nsb3Nl
IG9yXHBhcg0KPj4gZGlzdHJpYnV0ZSBpdHMgY29udGVudHMgdG8gYW55IG90aGVyIHBlcnNvbi5c
cGFyDQo+PiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq
KioqKioqKioqKioqKioqKioqKlxwYXINCj4+XHBhcg0KPj5ccGFyDQo+PiAtLS0tXHBhcg0KPj4g
VG8gdW5zdWJzY3JpYmUsIHNlbmQgYSBtZXNzYWdlIHdpdGggYm9keSAiU0lHTk9GRiBCTEFDS0JP
WCIgdG9ccGFyDQo+PiBMSVNUU0VSVkBMSVNUUy5PQkVST04uQ0hccGFyDQpccGFyDQpccGFyDQot
LS0tXHBhcg0KVG8gdW5zdWJzY3JpYmUsIHNlbmQgYSBtZXNzYWdlIHdpdGggYm9keSAiU0lHTk9G
RiBCTEFDS0JPWCIgdG8gTElTVFNFUlZATElTVFMuT0JFUk9OLkNIXHBhcg0KfQ==
----boundary-LibPST-iamunique-1685673045_-_---
Received on Fri Oct 14 2011 - 14:26:18 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:30:10 UTC