Re: [BLACKBOX] Type transfer

From: Rene A. Krywult <"Rene>
Date: Fri, 14 Oct 2011 15:09:44 +0200

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

r:=n;
r:=r*r;
And if you fear overflow, you should ASSERT against it, I believe.

Rene
-------- Original-Nachricht --------
> Datum: Fri, 14 Oct 2011 13:26:18 +0100
> Von: Robert <robert.campbell_{([at]})nowhere.xy
> An: BLACKBOX{([at]})nowhere.xy
> Betreff: Re: [BLACKBOX] Type transfer

> 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

-- 
NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!		
Jetzt informieren: http://www.gmx.net/de/go/freephone
----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-797241922_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzc1xmY2hhcnNldDAgQXJpYWw7fQ0Ke1xmMVxmbW9kZXJuIENvdXJpZXIgTmV3O30NCntcZjJc
Zm5pbFxmY2hhcnNldDIgU3ltYm9sO30NCntcZjNcZm1vZGVyblxmY2hhcnNldDAgQ291cmllciBO
ZXc7fX0NCntcY29sb3J0YmxccmVkMFxncmVlbjBcYmx1ZTA7XHJlZDBcZ3JlZW4wXGJsdWUyNTU7
fQ0KXHVjMVxwYXJkXHBsYWluXGRlZnRhYjM2MCBcZjBcZnMyMCByOj1uO1xwYXINCnI6PXIqcjtc
cGFyDQpBbmQgaWYgeW91IGZlYXIgb3ZlcmZsb3csIHlvdSBzaG91bGQgQVNTRVJUIGFnYWluc3Qg
aXQsIEkgYmVsaWV2ZS5ccGFyDQpccGFyDQpSZW5lXHBhcg0KLS0tLS0tLS0gT3JpZ2luYWwtTmFj
aHJpY2h0IC0tLS0tLS0tXHBhcg0KPiBEYXR1bTogRnJpLCAxNCBPY3QgMjAxMSAxMzoyNjoxOCAr
MDEwMFxwYXINCj4gVm9uOiBSb2JlcnQgPHJvYmVydC5jYW1wYmVsbF9AVElTQ0FMSS5DTy5VSz5c
cGFyDQo+IEFuOiBCTEFDS0JPWEBMSVNUUy5PQkVST04uQ0hccGFyDQo+IEJldHJlZmY6IFJlOiBb
QkxBQ0tCT1hdIFR5cGUgdHJhbnNmZXJccGFyDQpccGFyDQo+IFllcywgYnV0IC4uLi5ccGFyDQo+
IFxwY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BwZXJzb24u
XHBhcg0KPiA+PiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq
KioqKioqKioqKioqKioqKioqKioqKlxwYXINCj4gPj5ccGFyDQo+ID4+XHBhcg0KPiA+PiAtLS0t
XHBhcg0KPiA+PiBUbyB1bnN1YnNjcmliZSwgc2VuZCBhIG1lc3NhZ2Ugd2l0aCBib2R5ICJTSUdO
T0ZGIEJMQUNLQk9YIiB0b1xwYXINCj4gPj4gTElTVFNFUlZATElTVFMuT0JFUk9OLkNIXHBhcg0K
PiBccGFyDQo+IFxwYXINCj4gLS0tLVxwYXINCj4gVG8gdW5zdWJzY3JpYmUsIHNlbmQgYSBtZXNz
YWdlIHdpdGggYm9keSAiU0lHTk9GRiBCTEFDS0JPWCIgdG9ccGFyDQo+IExJU1RTRVJWQExJU1RT
Lk9CRVJPTi5DSFxwYXINClxwYXINCi0tIFxwYXINCk5FVTogRnJlZVBob25lIC0gMGN0L21pbiBI
YW5keXNwYXJ0YXJpZiBtaXQgR2VsZC16dXJcJ2ZjY2stR2FyYW50aWUhXHRhYiBcdGFiIFxwYXIN
CkpldHp0IGluZm9ybWllcmVuOiBodHRwOi8vd3d3LmdteC5uZXQvZGUvZ28vZnJlZXBob25lXHBh
cg0KXHBhcg0KXHBhcg0KLS0tLVxwYXINClRvIHVuc3Vic2NyaWJlLCBzZW5kIGEgbWVzc2FnZSB3
aXRoIGJvZHkgIlNJR05PRkYgQkxBQ0tCT1giIHRvIExJU1RTRVJWQExJU1RTLk99fQAFQHcDYA6w
OibWgSc=
----boundary-LibPST-iamunique-797241922_-_---
Received on Fri Oct 14 2011 - 15:09:44 UTC

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