Post Reply 
RPL beginner
11-04-2021, 01:07 AM
Post: #7
RE: RPL beginner
(11-02-2021 05:20 PM)dwesti Wrote:  right now, but the manual says that when drawing a line, you need to call ORDERXY#, then the line draws incorrectly

ORDERXY# does more than simply swapping the X/Y pairs if X1>X2. It also swaps Y1 and Y2 in certain situations, which you definitely don't want for this. Here's how it is defined:
Code:
::
  4PICK 3PICK #>
  IT 2SWAP

  3PICKOVER #>
  IT SWAPROT
;

Everything up to (and including) the 2SWAP command is what you need in this situation; the rest of it should not be performed. There's no way to remove the excess from the built-in command, so I'd recommend just including that initial code where needed or possibly creating a subroutine with those commands to call.

There's also the possibility of using the DRAWLINE#3/TOGGLELINE#3 pair of commands instead of LINEON/LINEOFF. The former pair has a built-in check for X values to make sure it can draw the line appropriately, whereas the latter does not. That would obviously require you to change the code around so that it uses the graphics display (PICT) instead of the text display, but that's not too difficult. SysRPL programs should save the existing PICT data before making any changes, though, since that data is considered to be "owned" by the user and is expected to be left intact by most programs.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RPL beginner - dwesti - 10-30-2021, 07:23 PM
RE: RPL beginner - David Hayden - 11-01-2021, 02:11 PM
RE: RPL beginner - dwesti - 11-01-2021, 04:40 PM
RE: RPL beginner - DavidM - 11-02-2021, 10:51 AM
RE: RPL beginner - dwesti - 11-02-2021, 02:18 PM
RE: RPL beginner - dwesti - 11-02-2021, 05:20 PM
RE: RPL beginner - DavidM - 11-04-2021 01:07 AM
RE: RPL beginner - dwesti - 11-04-2021, 09:21 AM
RE: RPL beginner - DavidM - 11-04-2021, 09:49 AM
RE: RPL beginner - dwesti - 11-04-2021, 04:04 PM
RE: RPL beginner - DavidM - 11-05-2021, 10:12 AM
RE: RPL beginner - dwesti - 11-06-2021, 06:41 PM
RE: RPL beginner - DavidM - 11-07-2021, 01:38 PM
RE: RPL beginner - dwesti - 11-08-2021, 05:40 PM
RE: RPL beginner - DavidM - 11-11-2021, 02:33 AM
RE: RPL beginner - dlidstrom - 11-13-2021, 08:04 PM
RE: RPL beginner - BINUBALL - 11-14-2021, 02:06 AM
RE: RPL beginner - DavidM - 11-14-2021, 12:49 PM



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