473,790 Members | 2,617 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

about the #pragma

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.

Jun 8 '06 #1
8 7882
"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>

Jun 8 '06 #2
"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_Keit h) 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.
Jun 8 '06 #3
Keith Thompson <ks***@mib.or g> wrote:
"rw******@gmai l.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
implementati on-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.
Jun 8 '06 #4
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
Jun 8 '06 #5
thank you all very much,
after read these, I have got the main idea of what the #pragma means.

thanks a lot!

Rwen.

Jun 9 '06 #6
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...)
Jun 9 '06 #7
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.

Jun 10 '06 #8
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)
Jun 10 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
3968
by: Shri | last post by:
Can anybody tell me where i can find a detailed document on #pragma .... --shri
18
2454
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 compatibility problems. The contents of the jmp_buf buffer are specific
1
3087
by: Gustavo L. Fabro | last post by:
Greetings! Going directly to the point: myclass.h: //-------------------------------------- #pragma managed //Forward declaration
0
1079
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 way to forward function exported by ordinal. i tried, however the linker reported me with the following: PureGina.exp : error LNK2001: unresolved external symbol _ExpFunc1 PureGina.exp : error LNK2001: unresolved external symbol _ExpFunc10...
15
3763
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 high-standard books...
4
1276
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. Granted they are both fast but the ASP speeds makes me think ASP object caching is better/faster (as the SQL is the exactly the same) Either that or I don't have something setup correctly (yet). ASP pages use: Response.Expires = -1
26
3830
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? Thanks...
2
3921
by: aleemakhtar1 | last post by:
wat is use of pragma directive in embedded sys ??
0
10696
debasisdas
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 the Oracle compiler that tells it to do something. In this case you are telling Oracle to associate an error that you choose to a variable that you choose. This pragma must go in the declarative section of your block. Types of PRAGMA...
0
10200
jinu1996
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9986
tracyyun
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9021
agi2029
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7529
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6769
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5422
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5551
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3703
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2909
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.