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

Home » Public Forums » archive » Re: Consulta sobre until - repeat
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: Consulta sobre until - repeat [message #52319] Fri, 26 January 2007 09:51
Vince Hradil is currently offline  Vince Hradil
Messages: 574
Registered: December 1999
Senior Member
The last time through the loop - when your input is 'ni' - the n='ni'
gets translated as n=0. It would be better to check that n is a number
before doing the assignment. Something like

if size(n,/type) ne 7 then begin
...
endif

On Jan 26, 11:36 am, "hernan" <tmil...@yahoo.com> wrote:
> He tenido el siguiente problema:
> pro idea
> data = findgen(10,10)
> repeat begin
> n = ''
> read, n, prompt = 'ingrese la fila a eliminar: '
> data[*,n] = 0
> print, data
> endrep until (n eq 'ni')
> print, data
> end
>
> mi problema esta que al salir del until la fila data[*,0] la convierte
> en 0 cuando no la defino.
> No logro entender el motivo de esto y les quiero consultar sobre como
> superar este problema
> Gracias por la respuesta.
>
> Atentamente
> Hernan Rivero Gavilan
[Message index]
 
Read Message
Previous Topic: Consulta sobre until - repeat
Next Topic: Rasterize an image

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

Current Time: Fri Oct 10 02:19:23 PDT 2025

Total time taken to generate the page: 0.56272 seconds