and type in the Kerningham and Richie (the creators of "c") intro example of a C program: #include <stdio... 

Każdy jest innym i nikt sobą samym.

h>
void main(void) {
printf("hello world\n");
}
190
I save the file and then envoke the GNU C compiler to compile the file "hello.c": gcc hello.c
The gcc compiler produces an executable binary file "a.out", which I can run:
./a.out
g++ filename.C
GNU C++ compiler. The capital "C" is often used for C++ sources. If you need an "integrated development envrionment" (IDE), kdevelop is really something you would probably like to look at.
kdevelop
(type in X-terminal) Intergrated development environment for K. Really worth downloading (if it does not come with your distribution).
glade
(type in X-terminal) A graphical builder of user interfaces.
"Glade is an interface builder developed by Damon Chaplin. It allows graphical and interactive construction of Gnome/Gtk graphical user interfaces. From Glade, the generated interface can be saved in a xml file or directly exported to C code to be included in a C source tree. Glade also allows to define the name of the handlers - functions - to be attached to the various event of the interface. For example the function (name) to be called when a specific menu item is pressed."
(From: http://linuxtoday.com/news_story.php3?ltsn=2000-07-16-013-04-PS-GN)
What "C" functions are available for programming under Linux?
Too many for a newbie like myself. I started by studying the header files (*.h) in the directory
/usr/include and all its subdirectories. To find a header file that contains a prototype for a given function (e.g., cosh) I would do something like:
cd /usr/include
grep -H "cosh" *.h
guile
An implementation of "Scheme" programming language. Scheme is a modern dialect of LISP.
Silly guile examples:
(+ 1 1)
(system "ls")
(display "hello\n")
(define a 7)
(exit)
g77
GNU FORTRAN. If you are into FORTRAN, you may want to check:
http://studbolt.physast.uga.edu/templon/fortran.html to find a FORTRAN compiler that suits your
particular needs under Linux.
expect
Scripting language for "programmed dialog". See man expect.
191
kylix
This is a brand-new (Feb.2001) commercial offering from Borland (aka Inprise). In short, it is a Linux port of the famous object-oriented Pascal ("Delphi"). kylix is unlikely to be on your Linux distribution CD, you must pay for it, but if you want the best rapid application development (RAD) platform with a code portablity between Linux and MS Windows, large number of pre-built components, etc., kylix is likely the best. In my opinion, Delphi is significanly better than MS Visual Basic.
make
Run the "make" utility to build (compile, link, etc) a project described in the Makefile found in the current directory.
yes
Generate a never-ending output of strings containing "yes" (it does end when <Ctrl><c> is pressed).
Sounds like a silly utility, but it can be used to write simple program on the command line. This amusing example determines the frequency of digits in 100 000 radom numbers (the whole command is a single line):
yes | sed ’100000q’ | awk
’BEGIN{srand();u=6*log(10)}{printf"%e\n",rand()*exp(rand()*u)}’| cut
-c1 | sort | uniq-c
Hope this example does not scare you to much--it surely shows that old-fashioned UNIX command line can be as complicated (and powerful) as you want to make it. If you are interested why the frequency of digits varies, try the place from which I borrowed the example:
http://www.newscientist.com/ns/19990731/letters4.html
7.3 Math Tools
dc
A command-line, arbitrary-precision "reverse Polish notation" (RPN) calculator.
dc is based on the concept of a stack, which is central to the operations of modern digital computer. A computer stack is not unlike a stack of kitchen plates, the last to come on stack, is the first to go out (this is also known as LIFO="last-in, first-out"). This contrasts with a queue (another important concept) where the first in is the first out (FIFO).
You can perform operations only on the number(s) which is on the top of the stack. The two basic operations are: push and pop (put on the top of stack, and retrieve from the top of stack).

Tematy