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

Home » Public Forums » archive » Reset fonts / Problem with colorbuttonbitmap.pro from D. Fanning
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: Reset fonts / Problem with colorbuttonbitmap.pro from D. Fanning [message #61391 is a reply to message #61279] Wed, 16 July 2008 07:02 Go to previous messageGo to previous message
jschwab@gmail.com is currently offline  jschwab@gmail.com
Messages: 30
Registered: December 2006
Member
> The 'problem' is when no element matches the condition...you always
> have to use the count parameter to check if the result is an usable
> index..
>
> for example, if I have an array A and I want to set all elements less
> than 0 to 0..then I would like to use a command like
>
> A[where(A lt 0)]=0
>
> But this works only if there is at least one element in A less than
> 0...so you always have to use two lines of code for such a simple
> thing..

For the really simple thing you mentioned, you can do it in one line.

a >= 0

For more complex things, the extra line of code isn't too much of a
hassle. Considering the usefulness of where() it's a price I'm quite
willing to pay.

Josiah
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Format Code Question
Next Topic: Plea for RESOLVE_ALL Help!

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

Current Time: Sun Oct 12 11:03:43 PDT 2025

Total time taken to generate the page: 1.28025 seconds