fork(1) download
  1. /* Basic pointer example */
  2.  
  3. DECLARE (ptr, var) FIXED BINARY;
  4. DECLARE target FIXED BINARY;
  5.  
  6. /* Initialize the variable */
  7. var = 42;
  8.  
  9. /* Assign the address of var to the pointer */
  10. ptr = ADDR(var);
  11.  
  12. /* Dereference the pointer to get the value */
  13. target = *ptr;
  14.  
  15. PUT SKIP LIST ('Value of var: ', var);
  16. PUT SKIP LIST ('Value through pointer: ', target);
Success #stdin #stdout 0.01s 5284KB
stdin
Standard input is empty
stdout
Standard output is empty