[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [CPROG] End of file? (Beginning of file??)



At 10:02 30/01/03, John Mørck Hansen wrote:
...
>'main' returnerer altid en værdi af typen 'int'. Det er rigtigt at nogle
>kompilere tillader brug af 'void main(...)' for derefter selv at ændre det
>til 'int' og en 'return 0;' i slutningen af programmet. Dette frarådes på
>det kraftigste at bruge denne notation.

Fint - så ved jeg det!
(Måske dumt spørgsmål?: Har det 'altid' været sådan? [Min bog er fra 1995 - 96])
Ikke des mindre starter langt de fleste eksempler i 'bogen' med "void main(
void )" - og de har hidtil 'virket' OK; men hvis 'main' altid returnerer
'int', kan man så ikke slet og ret udelade typebetegnelsen foran 'main'??
....

>'main' _*skal*_ altid returnerer en værdi af typen 'int', og kaldes med 0
>(nul), 2 eller 3 parametre

Altså ikke én parameter?
....

>Det skyldes en forskæld i tegnsættet mellem editoren og mail-programmet. Det
>er i de fleste tilfælde 'return' og mellemrum der er problemer med !!!

Ja, det er også mit indtryk!

mvh
Hans




 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:09 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *