Announcement

Collapse
No announcement yet.

Function parameters

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

  • Function parameters

    How do I know that the parameters are entered to the function is from the ram or flash?

    Code:
    var temp[20];
    
    func printData(var *params)
       if(params==from ram)  //  problem in here
           // process data
       else
           // process data
       endif
    endfunc
    
    func main()
      printData("this data is from flash");
     
      to(temp); putstr("this data is from ram");
      printData(temp);
    endfunc

  • #2
    A constant string is always in flash.

    If the string is build from, printed to an array variable or a mem_alloc'd area it is in RAM
    Mark

    Comment

    Working...
    X