1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

@eval question

Discussion in 'Support' started by timo, Jun 3, 2008.

  1. timo

    Joined:
    Jun 3, 2008
    Messages:
    2
    Likes Received:
    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
     
  2. joshjeppson

    Joined:
    Jun 2, 2008
    Messages:
    42
    Likes Received:
    0
    Try this:
    set answer=%@eval[%var1 * 60]

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


    - Josh
     
  3. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,718
    Likes Received:
    29
    On Mon, 02 Jun 2008 23:18:10 -0500, you wrote:


    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
     
  4. timo

    Joined:
    Jun 3, 2008
    Messages:
    2
    Likes Received:
    0
    thats perfect Josh, Thanks Very Much!

     

Share This Page