Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cstring=: 3 : 'memr (>y),0,_1'
- sdl2lib =: '/usr/local/lib/libSDL2.dylib'
- sdlcd=: 1 : ('(''"',sdl2lib,'" '',u)&(15!:0)')
- sdl_CreateWindowJ=:'SDL_CreateWindow * *c i i i i i' sdlcd
- or this as a test stub in C to mimic the signature:
- const char* window = "a window 0xaddress";
- const char* SDL_CreateWindow(const char* title, int x, int y, int w, int h, unsigned int flags){
- return window;
- }
- running it...
- sdl_CreateWindowJ 'this is a test';0;0;100;200;4
- sdl_CreateWindowJ 'this is a test';0;0;100;200;4
- ┌──────────┬──────────────┬─┬─┬───┬───┬─┐
- │4304518974│this is a test│0│0│100│200│4│
- └──────────┴──────────────┴─┴─┴───┴───┴─┘
- cstring=: 3 : 'memr (>y),0,_1'
- cstring=: 3 : 'memr (>y),0,_1'
- cstring <4304518974
- cstring <4304518974
- a window 0xaddress
- but then changing to use the '>' to discard the arguments and receive only the pointer...
- sdl_CreateWindowJ=:'SDL_CreateWindow > * * i i i i i' sdlcd
- sdl_CreateWindowJ=:'SDL_CreateWindow > * * i i i i i' sdlcd
- sdl_CreateWindowJ 'this is a test';0;0;100;200;4
- sdl_CreateWindowJ 'this is a test';0;0;100;200;4
- |domain error: sdl_CreateWindowJ
- | sdl_CreateWindowJ'this is a test';0;0;100;200;4
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement