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

Home » Public Forums » archive » Re: how does it evaluate: y * w # A where:
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: how does it evaluate: y * w # A where: [message #36349 is a reply to message #36348] Mon, 08 September 2003 07:26 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
iqbal_hassan@extenprise.net (Hassan Iqbal) writes:

> Hi,
> Please help me to understand as to how it is being evaluated and what
> do I get from this entire operation:
>
> x= y * w # A
>
> where:
>
> y= an array of 'n' elements
> w= an array of 'n' elements
> A= a matrix of 'n' columns and 'm' rows
>
> which operation is performed first: y*w or w # A

You've been asking this question, or ones like it, several times in
the past few days. Why not perform some experiments for yourself?

For example, you could practice with these two expressions:
x1 = (y * w) # A
x2 = y * (w # A)
Do both expressions work? If yes, are X1 and X2 different? If both
expressions don't work, can you see why?

Your current question is about associativity. Many languages have
left-to-right associativity, which means that operations with equal
precedence are paired left-first. Do you think that is true for IDL?

However, different operators can have different precedences. Can you
see what would happen if "*" (multiplication) were to be changed to
"+" (addition)? Perhaps the "Operator Precedence" section of the IDL
manual would help figure that one out.

Good luck,
Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Fluent data into IDL
Next Topic: A Colored Grid Problem

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

Current Time: Sun Oct 12 01:05:53 PDT 2025

Total time taken to generate the page: 0.80331 seconds