| 1. |
Solve : "Variables" "Equ"? |
|
Answer» I'm sorry, I just need help on what Variables and Equ is. Any help please ;O! The information can then be manipulated using the Set command e.g. SET ZZ=%ZZ%+10 which changes the value of ZZ to 133. A good explanation, but you use SET /A to do arithmeticQuote from: Dias de verano on January 07, 2009, 03:18:42 PM A good explanation, but you use SET /A to do arithmetic YES, of course, a major FUP, but it's very very hot here and haven't had enough G&T yet! Offending post edited.. Quote from: Dusty on January 07, 2009, 02:41:56 PM Generally a variable is the name of information stored. e.g. 123 could be stored for future use with the name ZZ using the Set command SET ZZ=123 The information can then be manipulated using the Set command e.g. SET/A ZZ=%ZZ%+10 which changes the value of ZZ to 133.Wait, do I make a Batch File that says that or do I enter it in a CMD raw?Try both ways..... but start with @echo off to stop the commands being echoed. Enter this at the command prompt, then as a batch script: @echo off cls set zz=123 set/a zz=%zz%+10 > nul cls & echo %zz% the answer should be displayed - then enter exit to return to windows or enter more commands. Have fun!!Quote from: Helpmeh on January 07, 2009, 03:13:15 PM EQU means EQUAL TO (these only work for numerical. Use == for anything else)i always use equ even with strings and nothing hapen right now Is this strange ? Code: [Select]C:\>if "cat" EQU "cat" echo yes yes C:\>if "cat" EQU "dog" echo yes C:\>if "cat" NEQ "dog" echo yes yes C:\>if "cat" gtr "dog" (echo yes) else (echo no) no C:\>if "dog" gtr "cat" (echo yes) else (echo no) yesQuote from: devcom on January 08, 2009, 01:45:05 PM Quote from: Helpmeh on January 07, 2009, 03:13:15 PMEQU means EQUAL TO (these only work for numerical. Use == for anything else)i always use equ even with strings and nothing hapen right now Is this strange ? Not strange, EQU is the text equivilant of == |
|