Announcement

Collapse
No announcement yet.

Floating Point Calculations in FlashBank_1

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

  • Floating Point Calculations in FlashBank_1

    Hello

    My second post to this forum.

    I have a program that calls for a number of functions from FlashBank_0 to FlashBank_1 through flash_Exec(FLASHBANK_1, args). This works fine however when I try to perform floating point calculations in the functions in FlashBank_1 I get a stack overflow (per example calling flt_ITOF(temp_1, 1) where temp_1 is a var temp_1[2]).

    Am I missing something? I went through all documentation available but couldn't find an answer.

    Thanks for replying, Luc

  • #2
    Hello,

    We have tried it and it did work ok. Here is the example code.


    Bank code
    func main()
    var temp_1[2] ;
    print("In bank ", flash_Bank(), " Float value is ");
    flt_ITOF(temp_1, 1);
    flt_PRINT(temp_1, "%g");

    repeat // maybe replace
    forever // this as well

    endfunc
    Main code
    func main()

    flash_Exec(FLASHBANK_1, 0);

    repeat // maybe replace
    forever // this as well

    endfunc


    I hope this helps

    Best regards

    Paul

    Comment


    • #3
      Thanks Paul

      I tried with a small program, starting from your code and it seems to work. I need to go back to my code and find out what is wrong. Again, thanks for your help.

      Luc

      Comment

      Working...
      X