@eval question

Jun 3, 2008
2
0
Bucks Co, PA
#1
Hi

Can I pass the answer of an @eval to a variable like this

set var1=1
echo %@eval[%var1% * 60] = %answer%

This doesn't work, I tried a few things, I didn't see it in the docs so thanks very much for any assistance.

simply, I want an alarm and here is what I have so far. I just cant figure out the @eval.

echo How many minutes ???
input %%timer
echo %@eval[%timer% * 60]
delay %timinmins%

Thanks!

timo
 
Jun 2, 2008
42
0
#2
Hi

Can I pass the answer of an @eval to a variable like this

set var1=1
echo %@eval[%var1% * 60] = %answer%

This doesn't work, I tried a few things, I didn't see it in the docs so thanks very much for any assistance.

simply, I want an alarm and here is what I have so far. I just cant figure out the @eval.

echo How many minutes ???
input %%timer
echo %@eval[%timer% * 60]
delay %timinmins%

Thanks!

timo
Try this:
set answer=%@eval[%var1 * 60]

Btw, unlike CMD, you do not need a trailing % to use variables.


- Josh
 
#3
On Mon, 02 Jun 2008 23:18:10 -0500, you wrote:


>Can I pass the answer of an @eval to a variable like this
>
>set var1=1
>echo %@eval[%var1% * 60] = %answer%
>
>This doesn't work, I tried a few things, I didn't see it in the docs so thanks very much for any assistance.
It's not clear what you want that second line to do. Did you mean something
like this?

v:\> set var1=1

v:\> set answer=%@eval[%var1% * 60]

v:\> echo %answer%
60
--
- Vince