comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Need integer consts eq long not short
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Need integer consts eq long not short [message #3100] Wed, 02 November 1994 12:32 Go to previous message
sgs is currently offline  sgs
Messages: 2
Registered: November 1994
Junior Member
I need pvwave to have long (4 byte) constant integers by default rather
than short (2 byte). Is there a way to force this behavior with a
system variable, or something?

Short integers cause problems like this:

for i=0,n do begin ... ; buggy, i is a short integer
for i=0L,n do begin ... ; correct, i is a long integer

Pvwave creates i as a short integer, because the constant 0 is, by default,
short. However, when (long) n is bigger than 32767, the loop only loops
to (n mod 32767).

(1) Unfortunately, these loops often produce reasonable, but incorrect
answers.

Many of the std/* and user/* routines provided with pvwave have this
bug. (grep for lines with "for i=0", and any lines with integer
constants). (Watch out! They work with your small test case, but fail
with your real, large dataset, see (1).)


Steve Spray sgs@lmsc.lockheed.com
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: array of dynamic arrays in PV~Wave?
Next Topic: Any codes for LCD Stereo Viewing?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 17:58:27 PDT 2025

Total time taken to generate the page: 0.00387 seconds