Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float array_get(float index) {
- float size = 2;
- if (index < 0) index += size;
- if (index > size) return 0;
- auto array_get_this;
- array_get_this = array_get + 1 + /* The magic */ ftoi(index);
- float ret;
- ret = array_get_this();
- return ret;
- }
- float array_0 = 1;
- float array_get_0() {
- print("Get0", ftos(array_0));
- return array_0;
- }
- float array_1 = 2;
- float array_get_1() {
- print("Get1", ftos(array_1));
- return array_1;
- }
- void main() {
- array_get(1);
- }
Advertisement
Add Comment
Please, Sign In to add comment