Re: volatile
From: Ravi (ravi_at_despammed.com)
Date: 10/12/03
- Next message: Joona I Palaste: "Re: volatile"
- Previous message: Joona I Palaste: "Re: Let's write a c program, without knowing what it does..."
- In reply to: Sheldon Simms: "Re: volatile"
- Next in thread: Joona I Palaste: "Re: volatile"
- Reply: Joona I Palaste: "Re: volatile"
- Reply: August Derleth: "Re: volatile"
- Reply: Barry Schwarz: "Re: volatile"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 13 Oct 2003 00:33:44 +0530
On Sun, 12 Oct 2003 14:35:01 -0400, Sheldon Simms
<sheldonsimms@yahoo.com> wrote:
>Footnote 114 in the C standard explains it like this:
>
> A volatile declaration may be used to describe an object
> corresponding to a memory-mapped input/output port or an
> object accessed by an asynchronously interrupting function.
> Actions on objects so declared shall not be optimized out
> by an implementation or reordered except as permitted by
> the rules for evaluating expressions.
I've read these things.
I understand this. But I want a proper example clearly
telling me the use of declaring a variable volatile etc.
TIA.
--
main(){char s[40]="sbwjAeftqbnnfe/dpn!ps!CSbwjACjhgppu/dpn";
int i;for(i=0;i<39;putchar(s[i++]-1));return 0;}
- Next message: Joona I Palaste: "Re: volatile"
- Previous message: Joona I Palaste: "Re: Let's write a c program, without knowing what it does..."
- In reply to: Sheldon Simms: "Re: volatile"
- Next in thread: Joona I Palaste: "Re: volatile"
- Reply: Joona I Palaste: "Re: volatile"
- Reply: August Derleth: "Re: volatile"
- Reply: Barry Schwarz: "Re: volatile"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|