Hi, guys,
I am confused with the preprocessor instruction #pragma.
What does the #pragma mean?
and what does this mean as follow?
====================
#pragma intterupt Timer
====================
any reply is appreciated. 8 7851
"rw******@gmail.com" wrote: Hi, guys,
I am confused with the preprocessor instruction #pragma.
What does the #pragma mean? and what does this mean as follow?
==================== #pragma intterupt Timer ====================
[...]
Pragmas are, by definition, implementation defined. They basically
say "hey, compiler, do something special here". What that "something"
is is entirely up to the compiler.
As to what your particular pragma does, you would have to check the
documentation for the particular compiler that was used to compile
the code.
--
+-------------------------+--------------------+-----------------------+
| Kenneth J. Brody | www.hvcomputer.com | #include |
| kenbrody/at\spamcop.net | www.fptech.com | <std_disclaimer.h> |
+-------------------------+--------------------+-----------------------+
Don't e-mail me at: <mailto:Th*************@gmail.com>
"rw******@gmail.com" <rw******@gmail.com> writes: Hi, guys,
I am confused with the preprocessor instruction #pragma.
What does the #pragma mean? and what does this mean as follow?
==================== #pragma intterupt Timer ====================
any reply is appreciated.
You posted the same article twice. Google seems to encourage this for
some reason.
A #pragma directive "causes the implementation to behave in an
implementation-defined manner" (except for a few of the form
"#pragma STDC ..."that are defined by C99). You'll have to consult
the documentation for your compiler to find out what "#pragma interrupt"
means.
--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Keith Thompson <ks***@mib.org> wrote: "rw******@gmail.com" <rw******@gmail.com> writes: What does the #pragma mean? and what does this mean as follow? ==================== #pragma intterupt Timer ====================
A #pragma directive "causes the implementation to behave in an implementation-defined manner" (except for a few of the form "#pragma STDC ..."that are defined by C99). You'll have to consult the documentation for your compiler to find out what "#pragma interrupt" means.
A function called as an ISR (interrupt service routine) may be called
at any time, in the middle of the execution of other functions.
To ensure that the original interrupted code can continue executing,
in most cases the interrupt pragma modifies the entry/exit code the
compiler will generate for a function, making it save (and restore on
exit) additional information about the processor state. It could save
more registers, floating point processor state, temporarily disable
interrupts, etc.
The details will change from system to system. As Keith wrote, only
the documentation for your compiler/environment will provide you with
more information. rw******@gmail.com wrote: Hi, guys,
I am confused with the preprocessor instruction #pragma.
What does the #pragma mean? and what does this mean as follow?
==================== #pragma intterupt Timer ====================
any reply is appreciated.
Except for a few pragmas defined in the 1999 standard, almost anything
used with the #pragma directive is platform-specific and questions
should be directed to a newsgroup dedicated to that platform. I don't
know what compiler you are using, but a newsgroup for it is the place
to ask.
Brian
thank you all very much,
after read these, I have got the main idea of what the #pragma means.
thanks a lot!
Rwen. rw******@gmail.com <rw******@gmail.com> wrote: thank you all very much, after read these, I have got the main idea of what the #pragma means.
Please quote some context when replying.
Thank you.
--
Ioan - Ciprian Tandau
tandau _at_ freeshell _dot_ org (hope it's not too late)
(... and that it still works...)
Keith Thompson wrote: "rw******@gmail.com" <rw******@gmail.com> writes: Hi, guys,
I am confused with the preprocessor instruction #pragma.
What does the #pragma mean? and what does this mean as follow?
==================== #pragma intterupt Timer ====================
any reply is appreciated.
You posted the same article twice. Google seems to encourage this for some reason.
Well, my posts to this group are currently over 400 and I've yet to
make a double/multiple post. AFAICS, it's not Google's fault, rather
it's the poster. Though currently I use an ADSL connection, I've used a
56K dial-up modem for many years. Often, it's so slow, that you might
get tempted to press the 'reply' button twice, thinking the site has
stalled.
Of course, there're also people who post multiple times, simply to get
a rise out the group. They may come from a web forum background, which
are much more lax on posting discipline.
santosh wrote: Keith Thompson wrote: You posted the same article twice. Google seems to encourage this for some reason.
Well, my posts to this group are currently over 400 and I've yet to make a double/multiple post. AFAICS, it's not Google's fault, rather it's the poster.
This is not true, it's just that you've been lucky not to encounter the
problem. Sometimes Google will report that there was an error and the
message couldn't be sent, but in fact it has. It happens. It happened
to me when I used Google last year.
Brian
--
If televison's a babysitter, the Internet is a drunk librarian who
won't shut up.
-- Dorothy Gambrell ( http://catandgirl.com) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Shri |
last post by:
Can anybody tell me where i can find a detailed document on #pragma ....
--shri
|
by: Peter Smithson |
last post by:
Hi,
I've read this page -
http://devrsrc1.external.hp.com/STK/impacts/i634.html
but don't understand it. Here's the text -
"Non-standard usage of setjmp() and longjmp() could result in...
|
by: Gustavo L. Fabro |
last post by:
Greetings!
Going directly to the point:
myclass.h:
//--------------------------------------
#pragma managed
//Forward declaration
|
by: 42601551 |
last post by:
in Jeff Partch's thread
http://groups.google.com/group/microsoft.public.vc.language/browse_thread/thread/b9468ebbf7927da8/a901653d04ad774a%23a901653d04ad774a?sa=X&oi=groupsr&start=1&num=3
says a...
|
by: muttaa |
last post by:
Hello all,
I'm a beginner in C...May i like to know the difference between a
#pragma and a #define....
Also,yet i'm unclear what a pragma is all about as i can find topics on
it only in...
|
by: mpaine |
last post by:
I just converted lots of ASP to ASP.NET (using ASP2ASPX) and noticed a
drop in rendering speed. For example, one ASP page takes 0.0313s to be
generated while the ASP.NET version takes 0.4842s. ...
|
by: Rick |
last post by:
I'm told that "#pragma once" has made it into the ISO standard for
either C or C++. I can't find any reference to that anywhere. If
it's true, do any of you have a reference I can use?
...
|
by: aleemakhtar1 |
last post by:
wat is use of pragma directive in embedded sys ??
|
by: debasisdas |
last post by:
PRAGMA:-Signifies that the statement is a pragma (compiler directive). Pragmas are processed at compile time, not at run time. They pass information to the compiler.
A pragma is an instruction to...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |