what is the exact reason ?


 
Thread Tools Search this Thread
Top Forums Programming what is the exact reason ?
Prev   Next
# 3  
Old 12-08-2001
Well it should be obvious that your compiler is doing all pre-increments before the addition and all post-increments after the addition.

So 2 and 6 are legal values for your code. So would be 3 and 5. Any behavior at all is legal according to the standards. This is because your code is illegal. The standards do not prescribe what the compiler must do with illegal code. In an ideal world, your code would not compile. Once you attach a pre or post increment to a variable it is illegal to reference that variable again until the next "sequence point" (basicly a comma or semicolon).
 
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. OS X (Apple)

What's the reason behind having -n option for mv command?

Sorry for a question that may seem dumb but learning UNIX basics I still can not grasp benefits of using mv -n source file target file I can understand the need for cp -n source file target file when you get a copy with contents untouched but the former baffles me. I know that this about... (8 Replies)
Discussion started by: scrutinizerix
8 Replies

2. AIX

Cluster failure reason

Hi guys ! I'm a French IT student in AIX, and i'm note very fluent in english. I have a task : Write a script to inform the administrator if on of a cluster UC is not working. I'm not going to ask you the script ^^' But i want to make a list of the failure reason of a cluster (network,... (10 Replies)
Discussion started by: Tharsan
10 Replies

3. Shell Programming and Scripting

echo exact xml tag from an exact file

Im stumped on this one. Id like to echo into a .txt file all names for an xml feed in a huge folder. Can that be done?? Id need to echo <name>This name</name> in client.xml files. $path="/mnt/windows/path" echo 'recording names' cd "$path" for names in $path than Im stuck on... (2 Replies)
Discussion started by: graphicsman
2 Replies

4. Shell Programming and Scripting

QUESTION1: grep only exact string. QUESTION2: find and replace only exact value with sed

QUESTION1: How do you grep only an exact string. I am using Solaris10 and do not have any GNU products installed. Contents of car.txt CAR1_KEY0 CAR1_KEY1 CAR2_KEY0 CAR2_KEY1 CAR1_KEY10 CURRENT COMMAND LINE: WHERE VARIABLE CAR_NUMBER=1 AND KEY_NUMBER=1 grep... (1 Reply)
Discussion started by: thibodc
1 Replies

5. UNIX for Advanced & Expert Users

programs are being autostarted for no reason

I have nothing in these folders and several programs are being autostarted for no reason. Chromium, nautilus, Okular, and quadrapassel are the programs being started. I have nothing in my .bashrc. Not sure where else to look. I have no idea why this is happening and it is driving me crazy. ... (0 Replies)
Discussion started by: cokedude
0 Replies

6. Red Hat

Server usually restart not reason

Hi everyone, - I have CentOs server 5.4 , I usually remote by ssh. - My problem is server usually restart but I don't reason. I check log in file /var/log/messages: I don't see "signal 15" which kernel have to receive before restart. Everyone can see in attach. - I try to restart with command... (3 Replies)
Discussion started by: vietbk87
3 Replies

7. Programming

Reason for Segmentation fault

The following program fails with "Segmentation fault" error message, while I try to run in Ubuntu (Debian) Linux m/c. It is not creating any core file, so I could not cross examine it with the debugger. See the comments for much better understanding. Could any one tell me the exact reason why the... (20 Replies)
Discussion started by: royalibrahim
20 Replies
Login or Register to Ask a Question
STRUCT(1)						      General Commands Manual							 STRUCT(1)

NAME
struct - structure Fortran programs SYNOPSIS
struct [ option ] ... file DESCRIPTION
Struct translates the Fortran program specified by file (standard input default) into a Ratfor program. Wherever possible, Ratfor control constructs replace the original Fortran. Statement numbers appear only where still necessary. Cosmetic changes are made, including chang- ing Hollerith strings into quoted strings and relational operators into symbols (.e.g. `.GT.' into `>'). The output is appropriately indented. The following options may occur in any order. -s Input is accepted in standard format, i.e. comments are specified by a c, C, or * in column 1, and continuation lines are specified by a nonzero, nonblank character in column 6. Normally, a statement whose first nonblank character is not alphanumeric is treated as a continuation. -i Do not turn computed goto statements into switches. (Ratfor does not turn switches back into computed goto statements.) -a Turn sequences of else ifs into a non-Ratfor switch of the form switch { case pred1: code case pred2: code case pred3: code default: code } The case predicates are tested in order; the code appropriate to only one case is executed. This generalized form of switch state- ment does not occur in Ratfor. -b Generate goto's instead of multilevel break statements. -n Generate goto's instead of multilevel next statements. -en If n is 0 (default), place code within a loop only if it can lead to an iteration of the loop. If n is nonzero, admit code segments with fewer than n statements to a loop if otherwise the loop would have exits to several places including the segment, and the seg- ment can be reached only from the loop. FILES
/tmp/struct* /usr/lib/struct/* SEE ALSO
f77(1) BUGS
Struct knows Fortran 66 syntax, but not full Fortran 77 (alternate returns, IF...THEN...ELSE, etc.) If an input Fortran program contains identifiers which are reserved words in Ratfor, the structured version of the program will not be a valid Ratfor program. Extended range DO's generate cryptic errors. Columns 73-80 are not special even when -s is in effect. Will not generate Ratfor FOR statements. STRUCT(1)