Announcement

Collapse
No announcement yet.

Intel Dual Core Processors

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Intel Dual Core Processors

    I recently installed a suite of programmes on to a new PC which
    has an Intel dual core processor.

    One of the main progs is suffering an error #6 (Overflow) and
    I have narrowed it down to the following SUB. For testing
    purposes I have remmed out the CALL statement in the programme
    and substituted the SUB's code inline.

    The programme succesfully executes the code after "next line
    1st" (ie it is a number) therefore passes to the line after
    "next line 2nd".

    Before executing "next n" I have printed "amt$" which is still
    "2" but printing "n" causes an ERR #6 (n is an integer) and it
    appears that the value "n" is corrupted.

    The client supplied a replacement PC which is also an Intel
    dual core and I have the same problem on the second PC.
    (The tesing has been done on the second PC).

    The processors on the 2 PC's are not the same. The first is
    a 2.8 gig and the second (testing PC) is a 3.00 gig.

    The programmes are running without issue on an AMD twin
    processor so "twin" appears not to be the issue and they are
    running on over 200 single processor systems.

    Any help or advice would be greatly appreciated!
    Roy

    +++++++++++++++++++++++++++++++++
    [for testing purposes amt$ is entered as "2"]
    fail = 0: pnt = 0
    for n = 1 to len(amt$)
    [next line 1st]
    if asc(mid$(amt$, n, 1)) > 47 and asc(mid$(amt$, n, 1)) < 58 then
    '
    elseif asc(mid$(amt$, n, 1)) = 46 then
    pnt = pnt + 1
    else
    fail = 1
    end if
    [next line 2nd]
    next n
    if pnt > 1 then fail = 1
    if fail = 1 then exit sub
    cnvrat2:
    if (left$(amt$, 1) <> "0" or amt$ = "0") then goto cnvrat3
    amt$ = mid$(amt$, 2, len(amt$) - 1): goto cnvrat2
    cnvrat3:
    if len(amt$) > 9 then fail = 1: exit sub
    amt# = val(amt$)
    +++++++++++++++++++++++++++++++

    ------------------

  • #2
    '
    Code:
    'You will have better luck posting actual code (without CALLS)
    'and please use code tags.  Converted to PBCC.  Not dual core, here.
    
    #COMPILE EXE
    #DIM ALL
    
    FUNCTION PBMAIN () AS LONG
        LOCAL fail  AS LONG
        LOCAL pnt   AS LONG
        LOCAL n     AS LONG
        LOCAL amt   AS STRING
        LOCAL amt99#
    
       '[for testing purposes amt$ is entered as "2"]
         fail = 0
         pnt = 0
         amt = "2222"
         FOR n = 1 TO LEN(amt$)
           PRINT "n = "n
        '   [next line 1st]  'what does this mean
          IF ASC(MID$(amt$, n, 1)) > 47 AND ASC(MID$(amt$, n, 1)) < 58 THEN
            PRINT "asc(mid$, n  statement"
          ELSEIF ASC(MID$(amt$, n, 1)) = 46 THEN
            pnt = pnt + 1
            PRINT "pnt = pnt + 1" pnt
          ELSE
            fail = 1
            PRINT "Fail = 1 here"
          END IF
         '[next line 2nd]  'is this a next statement
         'Error 6  Overflow (%ERR_OVERFLOW)  - This error is not currently supported with PBCC.
         
         NEXT n
         IF pnt > 1 THEN fail = 1:PRINT "pnt > 1 fail statement"
         IF fail = 1 THEN PRINT "Fail = 1 here":EXIT FUNCTION
    cnvrat2:
         PRINT "cnvrat2: line"
         IF (LEFT$(amt$, 1) <> "0" OR amt$ = "0") THEN PRINT "goto cnvrat3":GOTO cnvrat3
         amt$ = MID$(amt$, 2, LEN(amt$) - 1): PRINT "goto cnvrat2:":GOTO cnvrat2
    cnvrat3:
         PRINT "cnvrat3: line"
         IF LEN(amt$) > 9 THEN fail = 1: PRINT "amt$ > 9": EXIT FUNCTION
         amt99# = VAL(amt$)
    
         BEEP
         PRINT "Done"
         PRINT "Fail: "fail
         PRINT "Pnt:  "pnt
         PRINT "n:    "n
         PRINT "Amt99 "amt99
         WAITKEY$
    END FUNCTION


    [This message has been edited by Mike Doty (edited February 23, 2007).]
    How long is an idea? Write it down.

    Comment


    • #3
      Just off the top of my head...

      > [for testing purposes amt$ is entered as "2"]

      if asc(mid$(amt$, n, 1)) > 47 and asc(mid$(amt$, n, 1)) < 58 then
      [code omitted]
      The omitted code is what executes when amt$ = "2". Can't tell what you could be cheesing up there or if you might be correcting this later problem...

      >amt$ = mid$(amt$, 2, len(amt$) - 1): goto cnvrat2

      This is an illegal operation when amt$="2" because A) there is no character number 2 in "2" and taking a MID$ of Length zero (1-1) is also illegal. (A so-called "twofer" error).

      MCM
      Michael Mattias
      Tal Systems Inc. (retired)
      Racine WI USA
      [email protected]
      http://www.talsystems.com

      Comment


      • #4
        > have narrowed it down to the following SUB.

        ON LOCAL ERROR GOTO...

        ???
        Michael Mattias
        Tal Systems Inc. (retired)
        Racine WI USA
        [email protected]
        http://www.talsystems.com

        Comment

        Working...
        X