# # sub.jako # # A program to demonstrate macros and poor-man's subroutine # calls. # # Copyright (C) 2001-2005, The Perl Foundation. # This program is free software. It is subject to the same # license as the Parrot interpreter. # # $Id: sub.jako 12840 2006-05-30 15:08:05Z coke $ # use sys; const int X = 42; # These test integer global constants const int Y = 137; const num A = 3.14; # These test the non-integer global constant types const str B = "Howdy!"; var int x; # These test integer global variables var int y; var num a; # These test the non-integer global variable types var str b; x = X; y = Y; a = A; b = B; sub printit (int x, int y) { sys::print("x = $x; y = $y\n"); } printit(x, y); x = 1234; printit(x, y);