473,779 Members | 2,083 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

pragma

HI,
Can anyone tell me about pragma? And can u give an example of how
to use it?

Jan 16 '06 #1
11 2870
ramu wrote:
HI,
Can anyone tell me about pragma? And can u give an example of how
to use it?

Compiler specific, see you documentation. There is no such word as u.

--
Ian Collins.
Jan 16 '06 #2
Ian Collins wrote:
ramu wrote:
HI,
Can anyone tell me about pragma? And can u give an example of how
to use it?

Compiler specific, see you documentation. There is no such word as u.

Sorry, should be "your documentation".

--
Ian Collins.
Jan 16 '06 #3

"ramu" <ra******@gmail .com> wrote in message
news:11******** **************@ g47g2000cwa.goo glegroups.com.. .
HI,
Can anyone tell me about pragma? And can u give an example of how
to use it?


http://www.ucalgary.ca/~bgwong/n869.pdf

See 6.10.6
Jan 16 '06 #4
In article <11************ ***@drone2-svc-skyt.qsi.net.nz >,
Ian Collins <ia******@hotma il.com> wrote:
ramu wrote:
HI,
Can anyone tell me about pragma? And can u give an example of how
to use it?

Compiler specific, see you documentation. There is no such word as u.


Not necessarily. Below I give a 100% ISO-standard C program that uses
'pragma'.

#include <stdio.h>
int main(void) { puts("pragma is an interestingly concept"); }

Now, you may think this is silly, but the fact that is that here in this
ng, we don't have a clue as to what the OP could possibly be talking about,
so my solution is as good as any other take on it.

Could anyone disagree?

Jan 16 '06 #5

"ramu" wrote:
Can anyone tell me about pragma? And can u give an example of how
to use it?


http://en.wikipedia.org/wiki/Pragma
Jan 16 '06 #6
Kenny McCormack wrote:
In article <11************ ***@drone2-svc-skyt.qsi.net.nz >,
Ian Collins <ia******@hotma il.com> wrote:
ramu wrote:
HI,
Can anyone tell me about pragma? And can u give an example of how
to use it?
Compiler specific, see you documentation. There is no such word as u.


Not necessarily. Below I give a 100% ISO-standard C program that uses
'pragma'.

#include <stdio.h>
int main(void) { puts("pragma is an interestingly concept"); }

Now, you may think this is silly, but the fact that is that here in this
ng, we don't have a clue as to what the OP could possibly be talking
about,


Why?
so my solution is as good as any other take on it.

Could anyone disagree?


Yes.

--
Chris "understand ing is a three-edged sword" Dollin
Jan 16 '06 #7
"osmium" <r1********@com cast.net> writes:
"ramu" wrote:
Can anyone tell me about pragma? And can u give an example of how
to use it?


http://en.wikipedia.org/wiki/Pragma


I wouldn't advise using that article as a source of information about
C's "#pragma". The term "pragma" is a fairly general term for a
compiler directive. The article uses C's "#include" directive as an
example; that's certainly a compiler directive, but it's not a pragma
in the sense that C uses the word.

In C90, the language defines the #pragma construct, but all pragmas
are implementation-defined.

In C99, there are several language defined #pragmas:

#pragma STDC FP_CONTRACT ...
#pragma STDC FENV_ACCESS ...
#pragma STDC CX_LIMITED RANGE ...

where the argument is one of ON, OFF, or DEFAULT. Other #pragmas
starting with "STDC" may appear in future standards; #pragmas not
starting with "STDC" are implementation-defined.

C99 also adds an operator, _Pragma ( string-literal ), which is more
flexible in some cases (it can result from macro expansion, for
example).

--
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.
Jan 16 '06 #8
In article <ln************ @nuthaus.mib.or g>,
Keith Thompson <ks***@mib.or g> wrote:
....
In C90, the language defines the #pragma construct, but all pragmas
are implementation-defined.

In C99, there are several language defined #pragmas:


Wow. I did not know that. I thought/assumed that pragma was as much
"outside the box" as are the usual suspects (networking, graphics, blah,
blah, blah)

I stand corrected.

Jan 17 '06 #9
ga*****@yin.int eraccess.com (Kenny McCormack) writes:
In article <ln************ @nuthaus.mib.or g>,
Keith Thompson <ks***@mib.or g> wrote:
...
In C90, the language defines the #pragma construct, but all pragmas
are implementation-defined.

In C99, there are several language defined #pragmas:


Wow. I did not know that. I thought/assumed that pragma was as much
"outside the box" as are the usual suspects (networking, graphics, blah,
blah, blah)

I stand corrected.


For those of you who have killfiled Kenny McCormack, I felt it
necessary to point out that he's posted something sensible.

--
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.
Jan 17 '06 #10

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

Similar topics

10
2666
by: Steven T. Hatton | last post by:
Stroustrup says this: http://www.research.att.com/~bs/bs_faq2.html#macro "So, what's wrong with using macros?" "And yes, I do know that there are things known as macros that doesn't suffer the problems of C/C++ preprocessor macros. However, I have no
6
3968
by: Shri | last post by:
Can anybody tell me where i can find a detailed document on #pragma .... --shri
1
3087
by: Gustavo L. Fabro | last post by:
Greetings! Going directly to the point: myclass.h: //-------------------------------------- #pragma managed //Forward declaration
15
3762
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...
8
7881
by: rwen2012 | last post by:
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 ====================
5
3608
by: venkat | last post by:
Hi, I have come across the a pragma definition " #pragma switch direct ". I don't know any thing about pragma's. Even i when i search through google not getting exact information. what does pragma does?. what the statment "#pragma switch direct" does?. Thanks, Venkat.
26
3828
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
10695
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
9633
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9474
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10305
Oralloy
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10137
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
9928
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
6724
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
5373
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...
1
4037
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3632
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.