[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Mon Aug 12 15:04:36 1994 
Subject:rc_print_at 
From:"M. Sapiyan" 
Volume-ID:940813.01 

Hi all,

To draw an axis with a scale in a window, I have used the command rc_print_at
as below. This command has to be repeated for different values on the scale, ie.
0, 100, 200 etc., since the third arguement of rc_print_at has to be a string.
Is there a `better' way of doing this, so as to accomodate for changes in the
scale? Is there a command that prints out a value of a variable instead of
printint a string?

=======================================
;;; draws the x-axis
XpwSetColor(rc_window, 'black');
rc_drawline(-450,0,450,0);
for c from -450 by 100 to 450 do
    rc_drawline(c,0,c,-5)
endfor;
rc_print_at(-453,-17,'0');
rc_print_at(-361,-17,'100');
rc_print_at(-262,-17,'200');
rc_print_at(-162,-17,'300');
rc_print_at(-62,-17,'400');
rc_print_at(38,-17,'500');
rc_print_at(138,-17,'600');
rc_print_at(238,-17,'700');
rc_print_at(338,-17,'800');
rc_print_at(438,-17,'900');

=======================================

Thanks.

yan