Re: [BLACKBOX] Type transfer

From: [at]} <Georgy>
Date: Fri, 14 Oct 2011 14:45:26 +0200

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

Shouldn't LONG(n) be enough? It would convert INTEGER to LONGINT.

On Fri, Oct 14, 2011 at 2:26 PM, Robert <robert.campbell_{([at]})nowhere.xy
> 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:
>>        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
>


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-1162436278_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzc1xmY2hhcnNldDAgQXJpYWw7fQ0Ke1xmMVxmbW9kZXJuIENvdXJpZXIgTmV3O30NCntcZjJc
Zm5pbFxmY2hhcnNldDIgU3ltYm9sO30NCntcZjNcZm1vZGVyblxmY2hhcnNldDAgQ291cmllciBO
ZXc7fX0NCntcY29sb3J0YmxccmVkMFxncmVlbjBcYmx1ZTA7XHJlZDBcZ3JlZW4wXGJsdWUyNTU7
fQ0KXHVjMVxwYXJkXHBsYWluXGRlZnRhYjM2MCBcZjBcZnMyMCBTaG91bGRuJ3QgTE9ORyhuKSBi
ZSBlbm91Z2g/IEl0IHdvdWxkIGNvbnZlcnQgSU5URUdFUiB0byBMT05HSU5ULlxwYXINClxwYXIN
Ck9uIEZyaSwgT2N0IDE0LCAyMDExIGF0IDI6MjYgUE0sIFJvYmVydCA8cm9iZXJ0LmNhbXBiZWxs
X0B0aXNjYWxpLmNvLnVrPiB3cm90ZTpccGFyDQo+IFllcywgYnV0IC4uLi5ccGFyDQo+XHBhcg0K
PiBXaGF0IEkgd2FudCB0byBkbyBpc1xwYXINCj5ccGFyDQo+IFwnYTByIFwnYTA6PSBcJ2EwbiAq
IG5ccGFyDQo+XHBhcg0KPiBhbmQgaWYgSSBkb24ndCBjb252ZXJ0IGJlZm9yZSB0aGUgYXNzaWdu
bWVudCBJIHJpc2sgb3ZlcmZsb3cuXHBhcg0KPlxwYXINCj4gQ2hlZXJzXHBhcg0KPlxwYXINCj4g
Um9iZXJ0XHBhcg0KPlxwYXINCj5ccGFyDQo+IE9uIDE0LzEwLzIwMTEgMTI6MzAgUE0sIFJlbmUg
QS4gS3J5d3VsdCB3cm90ZTpccGFyDQo+PlxwYXINCj4+IE1PRFVMRSBQcml2Q29udjtccGF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1lc3Nh
Z2Ugd2l0aCBib2R5ICJTSUdOT0ZGIEJMQUNLQk9YIiB0b1xwYXINCj4gTElTVFNFUlZATElTVFMu
T0JFUk9OLkNIXHBhcg0KPlxwYXINClxwYXINClxwYXINCi0tLS1ccGFyDQpUbyB1bnN1YnNjcmli
ZSwgc2VuZCBhIG1lc3NhZ2Ugd2l0aCBib2R5ICJTSUdOT0ZGIEJMQUNLQk9YIiB0byBMSVNUU0VS
VkBMSVNUUy5PQkVST04uQ0hccGFyDQp9
----boundary-LibPST-iamunique-1162436278_-_---
Received on Fri Oct 14 2011 - 14:45:26 UTC

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