Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
cogu committed Feb 5, 2024
1 parent 8925fbc commit 14cb829
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ code = C.sequence()
code.append(C.sysinclude("stdio.h"))
code.append(C.blank())
char_ptr_type = C.type("char", pointer=True)
code.append(C.declaration(C.function("main", "int", params=[C.variable("argc", "int"),
C.variable("argv", char_ptr_type, pointer=True)
])))
code.append(C.declaration(C.function("main", "int",
params=[C.variable("argc", "int"),
C.variable("argv", char_ptr_type, pointer=True)
])))
main_body = C.block()
main_body.append(C.statement(C.func_call("printf", C.str_literal(r"Hello World\n"))))
main_body.append(C.statement(C.func_return(0)))
Expand Down Expand Up @@ -48,9 +49,10 @@ code = C.sequence()
code.append(C.sysinclude("stdio.h"))
code.append(C.blank())
char_ptr_type = C.type("char", pointer=True)
code.append(C.declaration(C.function("main", "int", params=[C.variable("argc", "int"),
C.variable("argv", char_ptr_type, pointer=True)
])))
code.append(C.declaration(C.function("main", "int",
params=[C.variable("argc", "int"),
C.variable("argv", char_ptr_type, pointer=True)
])))
main_body = C.block()
main_body.append(C.statement(C.func_call("printf", C.str_literal(r"Hello World\n"))))
main_body.append(C.statement(C.func_return(0)))
Expand Down

0 comments on commit 14cb829

Please sign in to comment.