[SOLVED !] problem with same variable in substraction ??


Closed Thread
Results 1 to 3 of 3
  1. #1
    Member kuhrig's Avatar
    Join Date
    Aug 2005
    Posts
    108
    Thumbs Up
    Received: 4
    Given: 0
    Total Downloaded
    4.71 GB

    0 Not allowed!

    Default problem with same variable in substraction ??

    Is this a problem or just not possible?

    dim wtemp0 as word
    dim wamps_zero as word

    wamps_zero = 2044

    This works correct:
    wtemp0 = 2157
    wtemp0 = wtemp0 - wamps_zero
    (correct result = 113)

    The following always gives a result of 0 (zero):
    wtemp0 = 1847
    wtemp0 = wamps_zero - wtemp0
    (2044 - 1847)

    I think with the 8-bit compiler there was no problem with this substraction.
    Any ideas?
    Thanks.
    PS: Don't need a workaround, just need to know if this is just not possible any more or a problem I should post elsewhere.

  2. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  3. #2
    Fanatical Contributor top204's Avatar
    Join Date
    Feb 2002
    Posts
    3,701
    Thumbs Up
    Received: 361
    Given: 173
    Total Downloaded
    2.08 GB

    0 Not allowed!

    Default Re: problem with same variable in substraction ??

    I'll take a look at it this afternoon. Thanks for spotting a possible anomaly.

  4. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  5. #3
    Member kuhrig's Avatar
    Join Date
    Aug 2005
    Posts
    108
    Thumbs Up
    Received: 4
    Given: 0
    Total Downloaded
    4.71 GB

    0 Not allowed!

    Default Re: problem with same variable in substraction ??

    Les, many thanks.

  6. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. [SOLVED !] Variable reading problem
    By zerone in forum Proton Plus Compiler v3
    Replies: 10
    Last Post: 22nd April 2011, 12:56
  2. variable SD_File_Name problem
    By Forhorse in forum SWright's Feedback Forum
    Replies: 5
    Last Post: 1st April 2011, 11:25
  3. Problem for Print or Float variable
    By SELCUK in forum Proton Plus Compiler v3
    Replies: 10
    Last Post: 31st May 2009, 19:07
  4. Variable Comparison with Symbol problem...
    By cap9qd in forum Proton Plus Compiler v3
    Replies: 6
    Last Post: 8th July 2006, 17:07

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts