Re: CLIL source code from book "Firmware demystified"
- From: Hans-Bernhard Broeker <broeker@xxxxxxxxxxxxxxxxxxxxx>
- Date: 30 Jun 2005 08:48:38 GMT
Roman Mashak <mrv@xxxxxxxx> wrote:
> I don't quite understand WHY I can pass 'argc' and 'argv' to another
> function?
Because they're nowhere near as special as you assume them to be.
They have *no* special meaning to the language, the standard library,
or anything. Using 'argc' and 'argv' as the names of the arguments of
main() in a hosted environment is pure convention.
Any C function can have arguments called 'argc' and 'argv', of
whatever type you like. You could use them with reversed roles, just
for the perverse fun of it, i.e. let 'argv' be the count of arguments,
and 'argc' the array of strings.
--
Hans-Bernhard Broeker (broeker@xxxxxxxxxxxxxxxxxxxxx)
Even if all the snow were burnt, ashes would remain.
.
- References:
- CLIL source code from book "Firmware demystified"
- From: Roman Mashak
- Re: CLIL source code from book "Firmware demystified"
- From: Lanarcam
- Re: CLIL source code from book "Firmware demystified"
- From: Roman Mashak
- Re: CLIL source code from book "Firmware demystified"
- From: Everett M. Greene
- Re: CLIL source code from book "Firmware demystified"
- From: Roman Mashak
- CLIL source code from book "Firmware demystified"
- Prev by Date: Re: Startup code
- Next by Date: Re: Startup code
- Previous by thread: Re: CLIL source code from book "Firmware demystified"
- Next by thread: Re: CLIL source code from book "Firmware demystified"
- Index(es):
Relevant Pages
|