V25 extends V24 with low-level memory access, binary string packing/unpacking, and string-array manipulation.
POKE address, valueWrites a single byte to a memory address.
LOCAL x AS LONG, p AS QUAD p = VARPTR(x) POKE p, 66 ' Write byte 66 to x
POKE$ address, string$Writes a block of bytes from a string to a memory address.
LOCAL buf AS STRING * 32 POKE$ STRPTR(buf), "ABCD"
PEEK(address)Reads a single byte from a memory address. Returns a numeric value.
x = PEEK(VARPTR(var))
Pack numeric values into fixed-size binary strings for random file I/O.
| Function | Packs To | Bytes |
|---|---|---|
MKBYT$(n) | BYTE | 1 |
MKI$(n) | INTEGER | 2 |
MKL$(n) | LONG | 4 |
MKDWD$(n) | DWORD | 4 |
MKQ$(n) | QUAD | 8 |
MKS$(n) | SINGLE | 4 |
MKD$(n) | DOUBLE | 8 |
MKE$(n) | EXT | 10 |
MKCUR$(n) | CURRENCY | 8 |
MKCUX$(n) | CUX | 8 |
packed = MKL$(123456) + MKS$(1.5) PUT #1, 1, packed
| Function | Unpacks From | Bytes |
|---|---|---|
CVBYT(s$) | BYTE | 1 |
CVI(s$) | INTEGER | 2 |
CVL(s$) | LONG | 4 |
CVDWD(s$) | DWORD | 4 |
CVQ(s$) | QUAD | 8 |
CVS(s$) | SINGLE | 4 |
CVD(s$) | DOUBLE | 8 |
CVE(s$) | EXT | 10 |
CVCUR(s$) | CURRENCY | 8 |
CVCUX(s$) | CUX | 8 |
GET #1, 1, packed x = CVL(LEFT$(packed, 4))
NUL$(n)Returns a string of n zero (null) bytes.
DEC$(n)Returns the decimal string representation of a number (like STR$ but without leading space).
JOIN$(array$(), delimiter$)Joins all elements of a dynamic STRING array into a single string, separated by the delimiter.
REDIM arr(1 TO 3) AS STRING arr(1) = "a" : arr(2) = "b" : arr(3) = "c" PRINT JOIN$(arr(), ",") ' "a,b,c"
SPLIT source$, delimiter$ INTO array$()Splits a source string by delimiter into a dynamic STRING array. Array is automatically REDIM'd.
REDIM parts(1 TO 1) AS STRING SPLIT "one,two,three", "," INTO parts() ' parts(1)="one", parts(2)="two", parts(3)="three"
MID$(target$, pos [, n]) = value$In-place substring assignment. Replaces characters in the target string without changing its length.
s = "abcdef" MID$(s, 2, 3) = "XYZ" ' s = "aXYZef"
MID$ assignment performs in-place replacement and does not grow the target string. If value$ is shorter than the replacement range, remaining characters keep their original values.V25 includes all V24 string-completion commands: REPEAT$, STRDELETE$, STRINSERT$, STRREVERSE$, BIN$, OCT$, LTRIM$, RTRIM$, REPLACE$, SCAN$, TALLY, VERIFY, COMMAND$, ENVIRON$, CURDIR$, TAB$, PEEK$, INPUT$, INKEY$, WAITKEY$.