Hello,
I have the idea to make a sort of stack in C that writes to a memory location.
But is this idea efficient? or are there better ways to store fast a variable, if you need to use it short after you store it?
Stack idea
- gravaera
- Member
- Posts: 737
- Joined: Tue Jun 02, 2009 4:35 pm
- Location: Supporting the cause: Use \tabs to indent code. NOT \x20 spaces.
Re: Stack idea
Yo,
The answer to your question is on line 3.
--Peace out,
gravaera
Code: Select all
int myFunction(void)
{
int myLocalArg;
// Do something;
};
--Peace out,
gravaera
17:56 < sortie> Paging is called paging because you need to draw it on pages in your notebook to succeed at it.
Re: Stack idea
I've made a fault in my starting post. i want to use it in another function.
I know that i can use global vars, but a simple call to a function that writes it to a memory location i simpler?
I know that i can use global vars, but a simple call to a function that writes it to a memory location i simpler?
Re: Stack idea
Yes, thats the solution, thanks!
i am going to implement that function
i am going to implement that function
Re: Stack idea
It's a compiler intrinsic. It comes with GCC.bergen110 wrote:Yes, thats the solution, thanks!
i am going to implement that function
Re: Stack idea
So i can use it without writing it?
Pretty cool!
Pretty cool!