The person asking the question and the person providing an answer should not be the same person. "No Ringers"
Yes. It should. and perhaps you should heed that advice yourself, as well.
showing code output doesn't prove a *censored* thing, by the way.
for example:
echo enter value.
set /p value=
set /a doubled=value*2
seems pretty clearcut. how do you "test" this to prove it works? loop through every number? No. You really cannot, but if you understand what is being done and how the values are stored, you should be able to predict that a number like 1073741824 will not computer properly.
Lo and behold, it doesn't:
C:\>set doubled=1073741824
C:\>set /a doubled=doubled*2
-2147483648
It's also not possible; and if it is, not at all easy- to make this work.
from
http://www.joelonsoftware.com/items/2007/12/03.htmlThe problem, here, is very fundamental. In order to mechanically prove that a program corresponds to some spec, the spec itself needs to be extremely detailed. In fact the spec has to define everything about the program, otherwise, nothing can be proven automatically and mechanically. Now, if the spec does define everything about how the program is going to behave, then, lo and behold, it contains all the information necessary to generate the program! And now certain geeks go off to a very dark place where they start thinking about automatically compiling specs into programs, and they start to think that they’ve just invented a way to program computers without programming.
Also, to make things ever more curious, BillRich, you don't even follow your own advice... certainly, you post your output, but many times it hardly scratches the surface of the OP's problem. for example, in the thread here:
http://www.computerhope.com/forum/index.php/topic,96718.0/topicseen.htmlthe specification is clear:
Please can anyone tell me the batch script which can search all drives and folders and subfolders in a computer for .jpg and .jpeg, once found they must get copied.
And yet, the posted code and output hardly scratch the surface:
@echo off
cd \
dir /s *.jpg
Oh! but wait! none of that matters, because you posted the output. of course it was the WRONG output since it was supposed to search
all drives for jpg
and jpeg, and they were never copied. therefore you hardly met any of the requirements except to search a single drive for 1 of 2 file extensions and then not perform the action intended on any of them anyway.
Output is meaningless when you can't read the *censored* specification. And output is meaningless for a batch as small as the above, where anybody even slightly familar with the command prompt can guess what will happen based on the- well, I don't know, the basic semantics and switches being used by well known commands? I mean, really, you don't need to post output for code that can be stepped through in ones head:
@echo off
shut off echoing to screen.
cd \
change to root directory
dir /s *.jpg
recursive dir on all subfolders for *.jpg
But of course, knowing what the commands do is meaningless, we must instead "post output" because it's a lot better to confuse the poster with terse, meaningless output from our command windows then actually discussing the problem or trying to guide them. And under no circumstances can the output from the prompt be called "guiding" because nobody has a *censored* clue what your getting at. Instead of saying "try using the dir command" Oh! wait, no, that's to short. let's instead post a 5 page output from MY dir command! I'll just erase the goats folder and nobody will be the wiser.