[{"data":1,"prerenderedAt":428},["ShallowReactive",2],{"navigation_docs":3,"-core-features-main-function":198,"-core-features-main-function-surround":423},[4,30,81,118,147,171,184],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":6},"Getting Started",false,"/getting-started","1.getting-started",[10,15,20,25],{"title":11,"path":12,"stem":13,"icon":14},"Introduction","/getting-started/introduction","1.getting-started/2.introduction","i-lucide-house",{"title":16,"path":17,"stem":18,"icon":19},"Installation","/getting-started/installation","1.getting-started/3.installation","i-lucide-download",{"title":21,"path":22,"stem":23,"icon":24},"Quick start","/getting-started/quickstart","1.getting-started/4.quickstart","i-lucide-code-xml",{"title":26,"path":27,"stem":28,"icon":29},"Troubleshooting","/getting-started/troubleshooting","1.getting-started/5.troubleshooting","i-lucide-wrench",{"title":31,"icon":6,"path":32,"stem":33,"children":34,"page":6},"Core Features","/core-features","2.core-features",[35,39,43,48,52,56,60,64,68,73,77],{"title":36,"path":37,"stem":38,"icon":24},"Main function","/core-features/main-function","2.core-features/1.main-function",{"title":40,"path":41,"stem":42,"icon":24},"Variables","/core-features/variables","2.core-features/2.variables",{"title":44,"path":45,"stem":46,"icon":47},"Comment","/core-features/comment","2.core-features/3.comment","i-lucide-hash",{"title":49,"path":50,"stem":51,"icon":24},"Conditionals","/core-features/conditionals","2.core-features/4.conditionals",{"title":53,"path":54,"stem":55,"icon":24},"Loops","/core-features/loops","2.core-features/5.loops",{"title":57,"path":58,"stem":59,"icon":24},"Functions","/core-features/functions","2.core-features/6.functions",{"title":61,"path":62,"stem":63,"icon":24},"Pointers","/core-features/pointers","2.core-features/7.pointers",{"title":65,"path":66,"stem":67,"icon":24},"Data types","/core-features/datatypes","2.core-features/8.datatypes",{"title":69,"path":70,"stem":71,"icon":72},"Operators","/core-features/operators","2.core-features/9.operators","i-lucide-percent",{"title":74,"path":75,"stem":76,"icon":24},"Literals","/core-features/a.literals","2.core-features/a.literals",{"title":78,"path":79,"stem":80,"icon":24},"Keywords","/core-features/b.keywords","2.core-features/b.keywords",{"title":82,"icon":6,"path":83,"stem":84,"children":85,"page":6},"Features","/features","3.features",[86,90,94,98,102,106,110,114],{"title":87,"path":88,"stem":89,"icon":24},"Const","/features/const","3.features/1.const",{"title":91,"path":92,"stem":93,"icon":24},"Define","/features/define","3.features/2.define",{"title":95,"path":96,"stem":97,"icon":24},"Enum","/features/enum","3.features/3.enum",{"title":99,"path":100,"stem":101,"icon":24},"Union","/features/union","3.features/4.union",{"title":103,"path":104,"stem":105,"icon":24},"Overloading","/features/overloading","3.features/5.overloading",{"title":107,"path":108,"stem":109,"icon":24},"Lambda","/features/lambda","3.features/6.lambda",{"title":111,"path":112,"stem":113,"icon":24},"Callback","/features/callback","3.features/7.callback",{"title":115,"path":116,"stem":117,"icon":24},"Auto","/features/auto","3.features/8.auto",{"title":119,"icon":6,"path":120,"stem":121,"children":122,"page":6},"Advance Features","/advance","4.advance",[123,127,131,135,139,143],{"title":124,"path":125,"stem":126,"icon":24},"Generic Type","/advance/generic-type","4.advance/1.generic-type",{"title":128,"path":129,"stem":130,"icon":24},"Errors","/advance/error","4.advance/2.error",{"title":132,"path":133,"stem":134,"icon":24},"Annotation","/advance/annotation","4.advance/3.annotation",{"title":136,"path":137,"stem":138,"icon":24},"Variadic Function","/advance/variadic-func","4.advance/4.variadic-func",{"title":140,"path":141,"stem":142,"icon":24},"Module","/advance/module-interface","4.advance/5.module-interface",{"title":144,"path":145,"stem":146,"icon":24},"Operator Overloading","/advance/operator-overloading","4.advance/6.operator-overloading",{"title":148,"icon":6,"path":149,"stem":150,"children":151,"page":6},"Struct","/struct","5.struct",[152,155,159,163,167],{"title":148,"path":153,"stem":154,"icon":24},"/struct/struct","5.struct/1.struct",{"title":156,"path":157,"stem":158,"icon":24},"Methods","/struct/methods","5.struct/2.methods",{"title":160,"path":161,"stem":162,"icon":24},"Init/Deinit","/struct/init-deinit","5.struct/3.init-deinit",{"title":164,"path":165,"stem":166,"icon":24},"Encapsulation","/struct/encapsulation","5.struct/4.encapsulation",{"title":168,"path":169,"stem":170,"icon":24},"Static","/struct/static","5.struct/5.static",{"title":172,"icon":6,"path":173,"stem":174,"children":175,"page":6},"Data Structures","/data-structure","6.data-structure",[176,180],{"title":177,"path":178,"stem":179,"icon":24},"Array","/data-structure/array","6.data-structure/array",{"title":181,"path":182,"stem":183,"icon":24},"Structural Type","/data-structure/strutural-type","6.data-structure/strutural-type",{"title":185,"icon":6,"path":186,"stem":187,"children":188,"page":6},"Standard Libraries","/stdlib","7.stdlib",[189,194],{"title":190,"path":191,"stem":192,"icon":193},"stdlib","/stdlib/stdlib","7.stdlib/stdlib","i-lucide-library-big",{"title":195,"path":196,"stem":197,"icon":24},"syscall","/stdlib/syscall","7.stdlib/syscall",{"id":199,"title":36,"body":200,"description":416,"extension":417,"links":418,"meta":419,"navigation":420,"path":37,"seo":421,"stem":38,"__hash__":422},"docs/2.core-features/1.main-function.md",{"type":201,"value":202,"toc":414},"minimark",[203,212,291,347,396,410],[204,205,206,207,211],"p",{},"Every single application must have a ",[208,209,210],"code",{},"main"," function, which serves as the entrypoint to the program. It is the starting point where a program execute instructions to perform any tasks. Also, there must exist only one main function at a time, no more that two in the same source program.",[213,214,215,223],"code-preview",{},[216,217,218,219,222],"strong",{},"Simple ",[208,220,221],{},"main()"," function",[224,225,227],"template",{"v-slot:code":226},"",[228,229,233],"pre",{"className":230,"code":231,"language":232,"meta":226,"style":226},"language-kh shiki shiki-themes material-theme-lighter one-light one-dark-pro","int main(){\n\n  # code ...\n\n  return 0;\n}\n","kh",[208,234,235,252,259,266,271,285],{"__ignoreMap":226},[236,237,240,244,248],"span",{"class":238,"line":239},"line",1,[236,241,243],{"class":242},"s8dPH","int",[236,245,247],{"class":246},"spnjr"," main",[236,249,251],{"class":250},"sM89C","(){\n",[236,253,255],{"class":238,"line":254},2,[236,256,258],{"emptyLinePlaceholder":257},true,"\n",[236,260,262],{"class":238,"line":261},3,[236,263,265],{"class":264},"seacL","  # code ...\n",[236,267,269],{"class":238,"line":268},4,[236,270,258],{"emptyLinePlaceholder":257},[236,272,274,278,282],{"class":238,"line":273},5,[236,275,277],{"class":276},"sQsOY","  return",[236,279,281],{"class":280},"sriKn"," 0",[236,283,284],{"class":250},";\n",[236,286,288],{"class":238,"line":287},6,[236,289,290],{"class":250},"}\n",[213,292,293,298],{},[216,294,295,297],{},[208,296,221],{}," function for a command-line app that takes arguments",[224,299,300],{"v-slot:code":226},[228,301,303],{"className":230,"code":302,"language":232,"meta":226,"style":226},"int main(string args[]){\n\n  # code ...\n\n  return 0;\n}\n",[208,304,305,323,327,331,335,343],{"__ignoreMap":226},[236,306,307,309,311,314,317,320],{"class":238,"line":239},[236,308,243],{"class":242},[236,310,247],{"class":246},[236,312,313],{"class":250},"(",[236,315,316],{"class":276},"string",[236,318,319],{"class":242}," args",[236,321,322],{"class":250},"[]){\n",[236,324,325],{"class":238,"line":254},[236,326,258],{"emptyLinePlaceholder":257},[236,328,329],{"class":238,"line":261},[236,330,265],{"class":264},[236,332,333],{"class":238,"line":268},[236,334,258],{"emptyLinePlaceholder":257},[236,336,337,339,341],{"class":238,"line":273},[236,338,277],{"class":276},[236,340,281],{"class":280},[236,342,284],{"class":250},[236,344,345],{"class":238,"line":287},[236,346,290],{"class":250},[348,349,350,356],"blockquote",{},[204,351,352,353,355],{},"A ",[208,354,221],{}," function must exactly meet the following rules:",[357,358,359,369,374,384,390],"ul",{},[360,361,362,363,365,366,368],"li",{},"The ",[208,364,221],{}," function must be named ",[208,367,210],{},", defining an alias for it is not permitted.",[360,370,362,371,373],{},[208,372,221],{}," function is a top-level function, so it must not be invoked by itself or by another function.",[360,375,376,377,379,380,383],{},"There must exist only two versions of the main function, either ",[208,378,221],{}," or ",[208,381,382],{},"main(string args[])",".",[360,385,386,387,389],{},"The return type of the main function must be ",[208,388,243],{}," and an integer value must be returned from the function.",[360,391,392,393,395],{},"Trying to interact with ",[208,394,221],{}," function by any actions, such as creating a pointer points to it, etc, will result in a compilation error.",[397,398,399,402],"note",{},[204,400,401],{},"The return value can be zero or non-zero integer!",[357,403,404,407],{},[360,405,406],{},"zero indicates a success.",[360,408,409],{},"non-zero indicates a failure.",[411,412,413],"style",{},"html pre.shiki code .s8dPH, html code.shiki .s8dPH{--shiki-light:#90A4AE;--shiki-default:#E45649;--shiki-dark:#E06C75}html pre.shiki code .spnjr, html code.shiki .spnjr{--shiki-light:#6182B8;--shiki-default:#4078F2;--shiki-dark:#61AFEF}html pre.shiki code .sM89C, html code.shiki .sM89C{--shiki-light:#90A4AE;--shiki-default:#383A42;--shiki-dark:#ABB2BF}html pre.shiki code .seacL, html code.shiki .seacL{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#A0A1A7;--shiki-default-font-style:italic;--shiki-dark:#7F848E;--shiki-dark-font-style:italic}html pre.shiki code .sQsOY, html code.shiki .sQsOY{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#A626A4;--shiki-default-font-style:inherit;--shiki-dark:#C678DD;--shiki-dark-font-style:inherit}html pre.shiki code .sriKn, html code.shiki .sriKn{--shiki-light:#F76D47;--shiki-default:#986801;--shiki-dark:#D19A66}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":226,"searchDepth":254,"depth":254,"links":415},[],"An entry point where the execution starts.","md",null,{},{"icon":24},{"title":36,"description":416},"TF-ZeaKAbPAylBiSvdap45wPG5DuB4MYzow0UKxo4W8",[424,426],{"title":26,"path":27,"stem":28,"description":425,"icon":29,"children":-1},"Common issues and their solutions when working with Cambo.",{"title":40,"path":41,"stem":42,"description":427,"icon":24,"children":-1},"Learn about variables in Cambo.",1774971227270]