|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools |
Rating:
|
Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
static local variables
Is there a correct way to define a variable inside a function as "static" so it retains a value between invocations of the function? I've resorted to a user code block in order to do it so far. Unfortunately, that doesn't make the variable "known" to the rest of the EasyC system -- it won't show up in the drop-down menus, for example.
|
|
#2
|
||||
|
||||
|
Re: static local variables
You can use a user code block and it must be in the first line of the function. Like you mentioned, shown below but you are correct it will not make the variable known. We had this in easyC for FRC 2 years ago and it caused allot of problems with users mis-using it.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Why Static Variables? | brianafischer | Programming | 13 | 26-01-2007 14:56 |
| Static Cling?? | orelinde | Electrical | 17 | 27-02-2006 17:33 |
| Static Variables | amateurrobotguy | Programming | 8 | 04-03-2005 00:40 |
| Static Electricity | JeffO | Championship Event | 5 | 19-04-2004 11:04 |
| Static Electricity | archiver | 2001 | 12 | 24-06-2002 00:34 |