@eval question

Jun 3, 2008
2
0
Bucks Co, PA
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
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
 
May 20, 2008
11,518
102
Syracuse, NY, USA
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
Thread starter Title Forum Replies Date
Joe Caverly Using @PSHELL from @EVAL Support 8
vefatica @EVAL's precision and significant digits Support 10
vefatica @EVAL's internal precision? Support 9
vefatica WAD @EVAL Support 7
thorntonpg @eval function, interesting results any explanation? Support 3
vefatica @eval[2**64-1] Support 14
D Syntax error when redirecting eval Support 5
T eval[] crashes with negative binary output Support 1
M erroneous @eval[]? Support 1
vefatica @EVAL, "AND" vs. "&" Support 6
dcantor Problem with @EVAL, TCC12 Support 7
E Problem with @eval[sin(0)] and similar Support 7
Gisle Vanem How to? 4NT "detach" question Support 2
D PDIR question Support 0
C forum Posting Question... Support 3
C question re: Move Support 3
S How to? Upgrade Question: What supporting documentation is required at time of purchase? Support 2
Peter Murschall Documentation Question to %@PSHELL Support 4
Fross Tab Question Support 6
Fross Quick Function Question Support 17
Dick Johnson Question about the Touch command Support 0
rps Documentation "Copy+Paste+run" question Support 2
vefatica SFTP question Support 17
vefatica Question about IPWorks Support 0
C How to? SHORTCUT question..... Support 6
vefatica TPIPE, crash and question Support 1
C Question / Suggestion Support 1
MickeyF Another TPIPE question Support 6
vefatica Another @EVERYTHING question Support 4
mikea How to? %@everything[] question Support 10
A License Question for Single User Support 5
Jay Sage Help Correction (and Related Question) Support 0
S Elapsed time in TCC prompt question Support 0
H command line parsing question Support 5
C Forum question Support 2
B Newbie here, I have a question. Support 4
J Dumb Question ... Support 4
Timothy Byrd Updating from TC 9 to TC 17 - TCTOOLBAR question Support 2
M A possibly stupid question about the "del" command... Support 7
M A just out of curiosity question re @DiskTotal Support 4
Fross Status Bar Time Question Support 1
A Stupid, obvious question - launch a BAT with TC Support 10
C How to? GLOBAL question Support 5
vefatica OT: VisualStudio question Support 1
vefatica Wildcard question Support 4
Dan Glynhampton v15 installer question Support 2
C Move question with Encrypted file... Support 6
M Maybe Maybe I'm being stupid (again), but a simple question... Support 4
C Message Board question Support 1
James Miller How to? filename completion question Support 1

Similar threads