The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
Grid program
02-25-2020, 06:37 PM (This post was last modified: 02-25-2020 06:38 PM by cahlucas.)
Post: #1
Grid program
Hi all,
The program that I present here must draw a grid of lines on the screen, the dimensions of which are determined by the parameters that you provide. If it is executed, the program only gives a white screen without any grid. The program does not give an error message, so the code is correct (no syntax error). Can someone help me get this program working? Sincerely, Karel.

Code:

#pragma mode(separator(.,;) integer(h32))
EXPORT CENTER_GRID(xsize,ysize,rows,cols)
BEGIN
RECT();
LOCAL xmin,xmax,ymin,ymax,xcrd,ycrd;
xmin:=160-((xsize+1)*cols+1)/2;
ymin:=120-((ysize+1)*rows+1)/2;
xmax:=160+((xsize+1)*cols+1)/2;
ymax:=120+((ysize+1)*rows+1)/2;
FOR ycrd FROM ymin TO ymax STEP 'ysize+1' DO
LINE_P(G0,xmin,ycrd,xmax,ycrd,#000000);
END;
FOR xcrd FROM xmin TO xmax STEP 'xsize+1' DO
LINE_P(G0,ymin,xcrd,ymax,xcrd,#000000);
END;
FREEZE
END;

I use HP-16C, WP-34S emulator, HP-35s, HP-48GX, HP-50g, and HP Prime G2.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Grid program - cahlucas - 02-25-2020 06:37 PM
RE: Grid program - Tonny - 02-25-2020, 09:37 PM
RE: Grid program - cahlucas - 02-25-2020, 10:20 PM



User(s) browsing this thread: 2 Guest(s)