[comp.os.cpm] Small C

PC3@IB.RL.AC.UK (Paul Clayson) (03/20/89)

Does anybody use Small C? I'm using the CP/M version available from
the Simtel20 PD archives. Does anybody have any information on what
is/is not available in small C, as I cannot get it to compile
multidimentional arrays, DO-WHILE, FOR or SWITCH-CASE. Are these
not available or do I need to know more on how to use them in Small C?

Thanks to anyone who can help,

Paul

mlinar@eve.usc.edu (Mitch Mlinar) (03/21/89)

In article <8903201146.AA00867@ucbvax.Berkeley.EDU> PC3@IB.RL.AC.UK (Paul Clayson) writes:
>Does anybody use Small C? I'm using the CP/M version available from
>the Simtel20 PD archives. Does anybody have any information on what
>is/is not available in small C, as I cannot get it to compile
>multidimentional arrays, DO-WHILE, FOR or SWITCH-CASE. Are these
>not available or do I need to know more on how to use them in Small C?

Yep, the documentation is quite clear in what it has as well as what it
is missing.  Items *NOT* supported in SmallC v1.2 are:

	- for
	- do/while
	- switch/case/default
	- multiple dimension arrays
	- goto
	- float (although it does support double)
	- structures
	- unions
	- multiple indirections (two or more * such as **i)
	- assignment operators (+= -= *= etc.)
	- storage classes
	- precompiler stuff other than #define/#include/#asm/#endasm
	- declaring a function AND its function type in the same line
		(e.g. double foo(i) int i; /* will not work */)
	- probably other things too

For a free compiler and a learning tool (you get the source code), it
is pretty decent.

-Mitch

rat@madnix.UUCP (David Douthitt) (03/23/89)

In article <15990@oberon.USC.EDU> mlinar@eve.usc.edu (Mitch Mlinar) writes:
| 
| Yep, the documentation is quite clear in what it has as well as what it
| is missing.  Items *NOT* supported in SmallC v1.2 are:
| 
| 	- for
| 	- do/while
| 	- switch/case/default
| 	- multiple dimension arrays
| 	- goto
| 	- float (although it does support double)
| 	- structures
| 	- unions
| 	- multiple indirections (two or more * such as **i)
| 	- assignment operators (+= -= *= etc.)
| 	- storage classes
| 	- precompiler stuff other than #define/#include/#asm/#endasm
| 	- declaring a function AND its function type in the same line
| 		(e.g. double foo(i) int i; /* will not work */)
| 	- probably other things too
| 
| For a free compiler and a learning tool (you get the source code), it
| is pretty decent.

The current version of Small C is AT LEAST 2.1 - and it DOES support:

	- for
	- do/while
	- switch/case/default
	- goto
	- assignment operators (+= -= *= etc.)
        - precompiler stuff including:
		#define
		#include
		#ifdef
		#ifndef
		#else
		#endif
		#asm
		#endasm
	- int foo(i) int i;  /* DOES work - or should */

Version 2.1 is a considerably better version than 1.x - I'm surprised
there are any 1x implementations anywere.

          [david]

-- 
======== David Douthitt :::: Madison, WI :::: The Stainless Steel Rat ========
FidoNet: 1:121/2 ::::: WittiNet: "Curiouser and curiouser, said Alice." ::::::
UseNet:  ...{rutgers|ucbvax|harvard}!uwvax!astroatc!nicmad!madnix!rat
ArpaNet: madnix!rat@cs.wisc.edu        {decvax|att}!