/* This is an NQC program that demonstrates the "SetUserDisplay" function for displaying values of a 1sec counter. Variable "count" is defined as a global variable because it will be used as an argument for SetUserDisplay; refer to Baum's book (pp. 58-60) for details */ int count; // count is defined as a global variable task main() { int x=0; SetUserDisplay (count, 0); // what happens if we display the local variable x? while (true) { x = 1 + x; count = x; Wait(100); } }