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

Home » Public Forums » archive » Re: a BUG or not a BUG in IDL ?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: a BUG or not a BUG in IDL ? [message #6636 is a reply to message #6629] Fri, 19 July 1996 00:00 Go to previous message
David Ritscher is currently offline  David Ritscher
Messages: 30
Registered: August 1995
Member
> print,'Long'
> J = 0L
> for I = 1,10 do begin
> print,I
> I = I + J ; Here I am also changing the type of "I"
> ;if i gt 20 then stop
> endfor
> end
> ;----------------------------------
> The first loop if OK, the second loop stops after the first
> iteration, but the last loop, just keeps going forever...

> Any comments ?
> At least should be a "WARNING" in the manual...

I would call it not a bug, on philosophical grounds. IDL / PV-Wave is
not a strong-typed language. This has advantages and disadvantages.
One strong disadvantage is any strange behavior that results from
doing things one shouldn't do with crossing variable types.

Something I would like to see added to the language is some ability to
take more control over typing. For example, a system variable could
be created, !variable_typing. When set to 1, it would cause an error
each time that the type of a variable is changed, as in:
a = 1
a = 1.
% Assignment changes type of variable

I would also like to see a mechanism for controlling variable typing,
for example, !min_variable_type
where if this is set to the type of long integer, a=1 would create a
long integer, instead of the irksome and antiquated default of short
integer.


--

David Ritscher
Raum 47.2.401
Zentralinstitut fuer Biomedizinische Technik
Albert-Einstein-Allee 47
Universitaet Ulm
D-89069 ULM
Germany

Tel: ++49 (731) 502 5313
Fax: ++49 (731) 502 5315
internet: david.ritscher@zibmt.uni-ulm.de
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: missing data
Next Topic: reading files into arrays

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

Current Time: Sat Oct 11 03:59:51 PDT 2025

Total time taken to generate the page: 0.08221 seconds