The 4DOS command processor for MS-DOS

4dos, batch commands, grub 4 dos, dos 4, ms dos 4

4DOS v6.00B Bug, I guess…

OK, you have opened the victim, now take a look to the section begin/end.
You will see that those commands are almost identical (i.e. echo command),
except that the 1st one uses @select function, which IMO couses the problem.
Just put ‘em in a batch file and try it out!

:begin
echo Press ENTER, press ENTER one more time! > 4bug.dat
if .==. (echo %@select[4bug.dat,7,1,9,79] %+ echo 2 TIMES!?!)
if .==. (echo Release A or B, %+ echo it’s a bug one anyway!)
:end

.
posted by admin in Uncategorized and have Comments (2)

2 Responses to “4DOS v6.00B Bug, I guess…”

  1. admin says:

    After seeing your post a few times, I finally decided to test your example.  As
    expected, it demonstrated the problem you’re seeing.  If your intent is to
    report this as a bug, good, send it to jp software.  If you’re trying to get
    around this apparent bug, use iff like below.

    The bug seems to be using command grouping with the if.  It doesn’t happen if
    you don’t use command grouping, and it doesn’t happen if you use iff

    All examples assume you already have 4bug.dat file.
    echo Press ENTER, press ENTER one more time! > 4bug.dat

    Examples:
    if .==. (echo %@select[4bug.dat,7,1,9,79])
    calls select twice (bug – should be once).

    if .==a (echo %@select[4bug.dat,7,1,9,79]%)
    calls select once (bug – shouldn’t).

    if .==. echo %@select[4bug.dat,7,1,9,79]%
    calls select once (correct).

    if .==a echo %@select[4bug.dat,7,1,9,79]%
    doesn’t call select (correct).

    iff .==. THEN (echo %@select[4bug.dat,7,1,9,79]) & ENDIFF
    calls select once (correct)

    iff .==a THEN (echo %@select[4bug.dat,7,1,9,79]) & ENDIFF
    doesn’t call select (correct)

  2. admin says:

    As previously mentioned to the original poster, there is no obvious
    "bug" when the _correct_ syntax is used:

        if . == . (echo %@select[4bug.dat,7,1,9,79])
        if . eq . (echo %@select[4bug.dat,7,1,9,79])
        etc…

    - Hide quoted text — Show quoted text -

    Ray Moritz wrote:

    > After seeing your post a few times, I finally decided to test your example.  As
    > expected, it demonstrated the problem you’re seeing.  If your intent is to
    > report this as a bug, good, send it to jp software.  If you’re trying to get
    > around this apparent bug, use iff like below.

    > The bug seems to be using command grouping with the if.  It doesn’t happen if
    > you don’t use command grouping, and it doesn’t happen if you use iff

    > All examples assume you already have 4bug.dat file.
    > echo Press ENTER, press ENTER one more time! > 4bug.dat

    > Examples:
    > if .==. (echo %@select[4bug.dat,7,1,9,79])
    > calls select twice (bug – should be once).
    >…

     _____________________________________________________________
     Mike Bessy                    JP Software, Inc.
     supp…@jpsoft.com            http://www.jpsoft.com/
     CompuServe 75300,1215         "GO JPSOFT"
     _____________________________________________________________