Advertisement
Guest User

no_os_for_exelotl_cdecl.nim

a guest
Jan 8th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nim 1.50 KB | None | 0 0
  1. roc printf(frmt: cstring) {.varargs, importc, header: "<stdio.h>", cdecl.}                                                                                                                                        
  2.                                                                                                                                                                                                                    
  3. type Foo = object                                                                                                                                                                                                  
  4.   x, y:int                                                                                                                                                                                                        
  5.                                                                                                                                                                                                                    
  6. var a {.codegenDecl: "const $# $# = {5, 6}".}: Foo                                                                                                                                                                
  7.                                                                                                                                                                                                                    
  8. printf("const FOO {%d, %d}\n", a.x, a.y)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement