Y to the power of X

Discussion in 'Questions (Windows Mobile)' started by ceaser, Jul 28, 2008.

  1. ceaser

    ceaser Active Member Licensed User

    Please Help:sign0085::sign0085:

    I am busy converting my land Surveying program from NSbasic to B4PPC. Great development platform!

    Attached to my program I have another small calculator program which gets launched from the Surveying program.

    Here is my problem.........on the PC Y to the power of X works, but it does not work on the handheld????:sign0148:

    I am attaching the code.

    Thanks
    Michael
     
  2. agraham

    agraham Expert Licensed User

    Nice calculator! but your buttons seem oddly named, Y^X is called XSquareRoot :confused:

    XSquareRoot works fine in the IDE on desktop and device but fails when optimised compiled on both device and desktop. It looks like a compiler bug Erel!
    Code:
    Stack1 = 3
    Result1 = Result1.text 
    ' contains 2
    Msgbox(Stack1 & " " & Result1.text & " " & Stack1^Result1.text) ' fails "3 2 1"
    Msgbox(Stack1 & " " & Result1 & " " & Stack1^Result1) ' works "3 2 9"
     
  3. ceaser

    ceaser Active Member Licensed User

    Y^X

    Hi agraham

    Thanks for testing it. I thought I was doing something wrong!

    Did you hear that Erel?

    By the way, I sometimes call things (like a button) to do certain functions and later on I change it to do something else, but I don't change the name!:sign0148::signOops:

    Thanks
    Michael
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    Thanks agraham.
    In the meantime you could also add parenthesis to workaround this bug:
    Code:
    Msgbox(... & " " & Stack1 ^ (Result1.text))
     
  5. ceaser

    ceaser Active Member Licensed User

    Y^X

    Hi Erel

    Thanks:sign0188:

    Michael
     
  6. ceaser

    ceaser Active Member Licensed User

    Y^X

    Hi Erel

    It work! Thanks:sign0188:

    Now how about my color dialog?:sign0060:

    Thanks
    Michael
     
  7. agraham

    agraham Expert Licensed User

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice