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

Home » Public Forums » archive » Re: Array subscripting oddity
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: Array subscripting oddity [message #1272 is a reply to message #1266] Tue, 17 August 1993 17:14 Go to previous messageGo to previous message
kevin is currently offline  kevin
Messages: 17
Registered: August 1992
Junior Member
glenn@atm.ch.cam.ac.uk (Glenn Carver) writes:

> I thought I understand array subscripting in PV-wave but this bit of
> code has got me foxed. I was trying to figure out what was going wrong
> with a procedure and finally tracked it down to a problem that I can
> demonstrate using the following example:

> WAVE> a=indgen(3)
> WAVE> print,a
> 0 1 2
> WAVE> m=[45,99]
> WAVE> print,m
> 45 99
> WAVE> a(m)=255
> WAVE> print,a
> 0 1 255

> Now, I would have thought that because both elements of 'm' are more
> than the size of 'a', no element of 'a' would have been assigned?
> The values '45' and '99' are completely arbitrary. You can set them to
> anything you like.

Looks like a bug to me. the values of m are not quite arbitrary. It works
right if these values are in the proper range for the size of a

Kevin Anderson
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: bug in tvtwm (X11R5 version)
Next Topic: PV-WAVE POINT+CLICK

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

Current Time: Tue Dec 02 07:49:06 PST 2025

Total time taken to generate the page: 1.59183 seconds