You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.
Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.
Copyright © 2002 Ian Mold (Matrix1 software)
Permission to copy, use, modify, sell and distribute this software is
granted provided this copyright notice appears in all copies.
This software is provided “as-is” without express or implied warranty,
and with no claim as to its suitability for any purpose.
This software contains several 'small' packages of commands for general use.
None of this is rocket science - just a few simple things that I thought were
missing from DBPro (and for practicing DLLs).
Just drop the dll into your compiler\plugins-user folder in the DBPro programs folder.
INSTR - Search for a string within a string.
Pos=INSTR(Source$, Search$, StartPos)
LTRIM$ - Remove leading spaces from the source string
RTRIM$ - Remove trailing spaces from the source string
TRIM$ - Remove both leading and trailing spaces from the source string
MID$ - Extract a string from another string
New$=MID$(Source$, StartPos, Length)
PADLEFT$ - Expand a string by adding leading spaces
PADRIGHT$ - Expand a string by adding trailing spaces
MIN/MIN$ - Returns the minimum of two values provided
MAX/MAX$ - Returns the maximum of two values provided
A version is included for each type
Note, QWORD means Quad-word (ie 8 bytes)
POKE - Set memory addresses
POKE BYTE Addr, Value
POKE WORD Addr, Value
POKE DWORD Addr, Value
POKE QWORD Addr, Value
POKE FLOAT Addr, Value
POKE DOUBLE Addr, Value
POKE STRING Addr, Value$
PEEK - Read a value from a memory address
Other - Get the address of a string
Addr=GET STRING PTR(Source$)
SET ZONE - Create a 2D or 3D zone
SET ZONE zoneNo, X1, Y1, Z1, X2, Y2, Z2
SET ZONE zoneNo, X1, Y1, X2, Y2
ZONE - Check for a coordinate within a zone
ZoneNo=ZONE(X, Y, Z)
CLEAR ZONE - Clear zones
CLEAR ZONE zoneNo
CLEAR ALL ZONES
05/12/2002 Added peek/poke for float and double floats.
Login to post a reply