Frees previous allocation on a pointer.
...
Parameter
- Name of pointer Pointer field
Exception Handling
An Error instance will be thrown with the following properties:
...
Code Block | ||
---|---|---|
| ||
pjs.define("staticVal", { type: 'char', length: 5 }); pjs.define("val", { type: 'char', length: 5, based: 'ptr' }); pjs.define("ptr", { type: 'pointer' }); ptr = pjs.alloc(1); ptr = pjs.realloc(ptr, 5); val = String.all('1'); console.log("Test return value: " + String(val).trim()); staticVal = val; pjs.dealloc(ptr) |
RPG Equivalent
...