Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

@eval question

Jun
2
0
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
 
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
 
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
 

Similar threads

Back
Top