[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: multiplication by zero
From: |
Martin Helm |
Subject: |
Re: multiplication by zero |
Date: |
Tue, 18 May 2010 18:36:28 +0200 |
User-agent: |
KMail/1.12.4 (Linux/2.6.31.12-0.2-desktop; KDE/4.3.5; x86_64; ; ) |
Am Dienstag, 18. Mai 2010 18:13:25 schrieb mmasny:
> I have such an expression:
> x=5;
> y = 0 * f(x);
>
> Will the value of f(x) be computed? What if it were .* instead of *? What
> if I had y = f(x) * 0?
>
I do not know the answer, but it is easy to find out by adding a side effect
to the function f, for example
disp("Calculate f")
as first command in the function body and then check if the side effect
happens.
- mh