Sign in

username:

password:



Not a member?

Search rabbit-semi



Search tips

Subscribe to rabbit-semi



Ads

Discussion Groups

Discussion Groups | Rabbit-Semi | difference between normal C language & Dynamic

This is a group for folks designing and programming embedded systems using the Rabbit Semiconductor C-programmable microcontroller. Rabbit Semi is a spin-off from Z-World who makes a variety of embedded modules and tools. This group is not affiliated with either Rabbit or Z-World, but is a user forum for sharing ideas, asking questions, flaunting knowledge, and other typical user group stuff. The Rabbit is a powerful uC, supported by a full-featured C-compiler.

difference between normal C language & Dynamic - vidyadhar dodamani - Jun 19 9:49:42 2008

Hi friends,
can i now what are the exact difference between normal C language and
Dynamic C language..

as i dont know the exact differences (in general i do know), technically how
these two languages differ i am unable to make it out..

so kindly if anybody know the exact differences plz let me know..
Thanks

Regards
Vidyadhar



(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )


Re: difference between normal C language & Dynamic - Scott Henion - Jun 19 10:21:02 2008

vidyadhar dodamani wrote:
> Hi friends,
> can i now what are the exact difference between normal C language and
> Dynamic C language..
>
> as i dont know the exact differences (in general i do know),
> technically how these two languages differ i am unable to make it out..
>
> so kindly if anybody know the exact differences plz let me know..
> Thanks

A standard ANSI C would have:

1. "signed" scalars (try to define a signed char)
2. Function prototypes including pointers to functions.
3. Extensive type checking
4. A Linker and separate compilations.
5. Support for multiple C and .h files with no non-ANSI syntax.
6. a search paths for includes and libraries.
7. stdio with stdin, stdout and stderr I/O handles (that can be
redirected at run time.)
8. Ways to define program segments and their memory layout during
compile/link.

Dynamic C has many things that are non-ANSI and never will be These
include many #keyword statements (memmap, #web, #use, #class
#GLOBAL_INIT); Costates, CoFunctions.

It does not support static scope of functions or variables (everything
is global.)

It does very little checking on function parameters. You can call
functions with too many parameters and DC will not complain. Has almost
no lint-type warnings:

unsigned xvar;

if (xvar<0) // this can never be true and should flag a warning
but DC puts in code for xvar>0x8000

It also compiles everything as one big C file (there is a hack to make
it look like files are separate.)

The above is just off the top of my head; there is much I probably forgot.

I do a lot of ports of DC to ANSI C; you would be amazed at how many
bugs just having a _real_ compiler finds. Things like unreachable code,
invalid comparisons, wrong number of parameters to functions, truncation
etc.



--
------------------------------------------
| Scott G. Henion| s...@shdesigns.org |
| Consultant | Stone Mountain, GA |
| SHDesigns http://www.shdesigns.org |
------------------------------------------
Rabbit libs: http://www.shdesigns.org/rabbit/
today's fortune
"But this one goes to eleven."
-- Nigel Tufnel


(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )