Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #954

Re: What's wrong with this cast?

From "Jamal" <vodotnet_nospam@yahoo.com>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: What's wrong with this cast?
Date 2011-04-26 16:38 -0400
Organization A noiseless patient Spider
Message-ID <ip7ag4$a27$1@dont-email.me> (permalink)
References <s87er6d3aomad9n4sjrh8ucetm5usn9aji@4ax.com>

Show all headers | View raw


Try:

nStockDW := DWORD(nStock)

Jamal

"D.J.W. van Kooten"  wrote in message 
news:s87er6d3aomad9n4sjrh8ucetm5usn9aji@4ax.com...

In a method where a subtraction is supposed never to yield <0 it did
nevertheless as the variable was a dword it gave a run time error.

I decided to work with floats inside (realized later that int was
better, but that is not the issue now ) and after checking for non
zero values, I assigned :

nStockDW:=DWORD(_CAST,nStock)

where nStock=float
nStockDW = dword

However: the first value of nStock (1,00) did not yeild dword 1 but a
huge number like 43423454554645, and a run time error after use of
course.

What is wrong with this conversion?

Dick 

Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

What's wrong with this cast? D.J.W. van Kooten <public@ic2remove.this.com> - 2011-04-26 21:33 +0200
  Re: What's wrong with this cast? "Jamal" <vodotnet_nospam@yahoo.com> - 2011-04-26 16:38 -0400
    Re: What's wrong with this cast? D.J.W. van Kooten <public@ic2remove.this.com> - 2011-04-26 22:46 +0200
      Re: What's wrong with this cast? "Geoff Schaller" <geoffx@softwarexobjectives.com.au> - 2011-04-26 22:17 +0000
  Re: What's wrong with this cast? Robert van der Hulst <E-55525A53-4141-E@heliks.nl> - 2011-04-27 11:42 +0200
    Re: What's wrong with this cast? D.J.W. van Kooten <public@ic2remove.this.com> - 2011-04-27 17:41 +0200
      Re: What's wrong with this cast? "Geoff Schaller" <geoffx@softwarexobjectives.com.au> - 2011-04-28 22:26 +0000

csiph-web