Hi Matt, Setup a serial port, run the code below and check out the difference to see what 'volatile' does to a procedure parameter. JAL normally takes the value of a procedure parameter before it calls the procedure and stores the result when it returns from that call (assuming the var is 'in out'). This is okay in most cases, but not if for instance, you pass a pin as parameter and want to wait until the line goes low or toggle it three times.
Joep procedure test1(volatile byte out device) is device = "a" device = "b" device = "c" end procedure procedure test2(byte out device) is device = "A" device = "B" device = "C" end procedure test1(serial_hw_data) test2(serial_hw_data) 2010/5/2 mattschinkel <[email protected]>: > Hi Joep, can you put some examples in your guide and explain this > more? I'd like to see some examples. > > Matt. > > -- > You received this message because you are subscribed to the Google Groups > "jallib" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/jallib?hl=en. > > -- You received this message because you are subscribed to the Google Groups "jallib" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/jallib?hl=en.
