| 1. |
Solve : Some more questions.? |
|
Answer» 1. How would you rig a batch file up to a SERVER? 2b. Maybe someone could try to immitate objects in DOS. I dunno. I don't think so. the LANGUAGE almost always has to have support for objects itself; this cannot be added on later; additionally, in order to properly emulate "objects" in batch you would need to have pointers, as well as structures, neither of which are available in batch. Anyway- if you are trying to create objects in batch or think you need to you probably need a better tool; VBScript and JScript are built into Windows installations by default, and you can also get Perl, Python, and various other languages that fully support objects. Quote from: Treval on March 16, 2010, 12:38:12 PM 3. Boolean can perhaps be done with if and 1 and 0 or "true"/"false" string vars. Ahh! but they are not true booleans- I think, the OP is explicitly referring to performing boolean arithmetic on them, with or and and and so forth. For example- in most languages flipping a boolean is easy, like: Code: [Select]c=!c but- with batch it has to be something like Code: [Select]if a=="true" set a="false" if a=="false" set a="true" of course you could always try to make this easier with subroutines for the various boolean operations. most of these questions come from treating the command batch language as a full-featured programming language; it WORKS fine at the PROMPT and for batches of commands, as it was designed, but if your batch needs any semi-modern language constructs (such as "objects") then what you are doing is too complex for batch (or your design is too complicated) |
|