Sponsored Content
Full Discussion: K&R vs. ANSI
Top Forums Programming K&R vs. ANSI Post 2884 by PxT on Friday 8th of June 2001 11:20:25 AM
Old 06-08-2001
K&R isn't a standard in the same way that ANSI is, it is more like a style of coding. The Kernighan & Ritchie style is used throughout their well-known book "The C Programming Language". If you want to see K&R style, buy the book or run your program through "indent" with the "-kr" option. If you want to know if your program meets strict ANSI requirements run it through gcc with the "-ansi" flag.
 

10 More Discussions You Might Find Interesting

1. Programming

Ansi C

Dear All, I have to develope some C functions in Unix for a Magic program. The original MSE code which compiles the attached C program uses a +z option, but the cc compiler don't know this. The complete command in the compiler script is 'cc -c -Aa +z myfile.c'. The warning message is 'The -z... (4 Replies)
Discussion started by: Frankie
4 Replies

2. Programming

ANSI C vs POSIX

can somebody explain about the ANSI C vs POSIX. say i was using open and fopen, i know that open is POSIX, and fopen is ANSI C. i read that that POSIX is a system call and ANSI C is like a standard library function. wouldn't the fopen function has to call on open function anyway to open any kind... (2 Replies)
Discussion started by: bb00y
2 Replies

3. HP-UX

ansi problem

Hi! Can anyone help me with the problem i am having. Im new to hpux and i am trying to set up the programs i use. One such program is the irc client BitchX, ive ran it on several pc/sun boxes with no problems. On my c360 with an fx6 card and a eizo f56 17in monitor (1024x768 85hz vesa) the ansi... (0 Replies)
Discussion started by: Lewis
0 Replies

4. HP-UX

ANSI / C Compiler for HP-UX 11.11

Good Day I downloaded Server Evaluation copy of C/ANSI compiler, but when I try to compile a file with it, it gives me following error - (for HP-UX 11.11 v1 PA-RISC) Internal Error: Codeword file /opt/ansic/newconfig/ansic.cwd missing or empty. Detailed Errors are as follows Internal... (3 Replies)
Discussion started by: shawnbishop
3 Replies

5. Programming

hint on ansi c

I am a student. And need help on following program. I want to make a c program. I have to scan a sentence and I have to interchange a word from that sentence. Example: Scan the sentence is " Drilling machine and Milling machine " . Replace the word "machine" by "operation". And output should... (2 Replies)
Discussion started by: dhaval chevli
2 Replies

6. Shell Programming and Scripting

Convert file from Unix - ANSI to PC - ANSI

Hi, I am creating a file in Unix using a shell script. The file is getting created in the Unix - ANSI format. My requirement is to convert it to the PC - ANSI format. Can anyone tell me how to do this? Thanks, Sunil (0 Replies)
Discussion started by: ssmallya
0 Replies

7. HP-UX

Unix_ANSI to PC-ANSI

I want to convert a file from Unix-ANSI to PC-ANSI format. How can i achieve that? (0 Replies)
Discussion started by: ssmallya
0 Replies

8. HP-UX

HP-UX ansi c precompiler

Hi, How can i find which ansi c precompiler are installed on my hp-ux b11.23 itanuim machine ? Thanks (3 Replies)
Discussion started by: yoavbe
3 Replies

9. Programming

why the implementatoin of Bakery algorithm in ANSI C does not work in ANSI C

I follow the description of wiki (Lamport's bakery algorithm - Wikipedia, the free encyclopedia), then implement that algorithm in C, but it doesn't work, Starving is still here, is the implementation worry? Only print out: Thread ID: 0 START! Thread ID: 0 END! Thread ID: 0 START!... (2 Replies)
Discussion started by: sehang
2 Replies

10. Programming

C fdopen with and without -ansi

I have very little experience with gcc compilation under different environments, so please bear with me. I carried over 20 years old project into Ubuntu 18.04, it has old style K&R parameters, no function declarations to speak of, many functions without return are not declared void, and on and... (8 Replies)
Discussion started by: migurus
8 Replies
DERIVATIONS(7)						Derivations of Applied Mathematics					    DERIVATIONS(7)

NAME
derivations - book: Derivations of Applied Mathematics DESCRIPTION
Understandably, program sources rarely derive the mathematical formulas they use. Not wishing to take the formulas on faith, a user might nevertheless reasonably wish to see such formulas somewhere derived. Derivations of Applied Mathematics is a book which documents and derives many of the mathematical formulas and methods implemented in free software or used in science and engineering generally. It documents and derives the Taylor series (used to calculate trigonometrics), the Newton-Raphson method (used to calculate square roots), the Pythagorean theorem (used to calculate distances) and many others. READING THE BOOK
Among other ways, you can read the book on your computer screen by opening the file /usr/share/doc/derivations/derivations.ps.gz with the gv(1) program under X(7). To print the book on a standard postscript printer, just zcat(1) then lpr(1) the same file. FILES
/usr/share/doc/derivations/derivations.ps.gz the book in postscript format /usr/share/doc/derivations/derivations.pdf.gz the book in PDF BUGS
The book is a work in progress. AUTHOR
The book and this manpage are written by Thaddeus H. Black, who also maintains the Debian package derivations in which they are distrib- uted. Users who need to contact the author in his role as Debian package maintainer can reach him at <thb@debian.org>. However, most e- mail will naturally be about the book itself: this should be sent to <thb@derivations.org>. COPYLEFT
Copyright (C) 1983-2010 Thaddeus H. Black. The book, this manpage and the entire derivations distribution are free software. You can redistribute them and/or modify them under the terms of the GNU General Public License, version 2. SEE ALSO
gv(1) [gv], zcat(1) [gzip], psselect(1) [psutils], lpr(1) [lpr], octave(1) [octave] Thaddeus H. Black 10 March 2010 DERIVATIONS(7)
All times are GMT -4. The time now is 06:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy