error msg and comments

This commit is contained in:
Irmen de Jong 2023-11-18 00:27:45 +01:00
parent 8e2c304b3c
commit f81061dd42
3 changed files with 10 additions and 1 deletions

View File

@ -285,6 +285,7 @@ close_end:
; note: only a single iteration loop can be active at a time!
; Returns true if the file is successfully opened and readable.
; No need to check status(), unlike f_open_w() !
; NOTE: the default input isn't yet set to this logical file, you can use reset_read_channel() to do this!
f_close()
cbm.SETNAM(string.length(filenameptr), filenameptr)

View File

@ -275,6 +275,9 @@ close_end:
sub f_open(uword filenameptr) -> bool {
; -- open a file for iterative reading with f_read
; note: only a single iteration loop can be active at a time!
; Returns true if the file is successfully opened and readable.
; No need to check status(), unlike f_open_w() !
; NOTE: the default input isn't yet set to this logical file, you can use reset_read_channel() to do this!
f_close()
cbm.SETNAM(string.length(filenameptr), filenameptr)
@ -390,6 +393,11 @@ _end rts
sub f_open_w(uword filenameptr) -> bool {
; -- open a file for iterative writing with f_write
; WARNING: returns true if the open command was received by the device,
; but this can still mean the file wasn't successfully opened for writing!
; (for example, if it already exists). This is different than f_open()!
; To be 100% sure if this call was successful, you have to use status()
; and check the drive's status message!
f_close_w()
cbm.SETNAM(string.length(filenameptr), filenameptr)

View File

@ -953,7 +953,7 @@ internal class AstChecker(private val program: Program,
if(expr.operator=="+" || expr.operator=="-") {
if(leftDt == DataType.STR || rightDt == DataType.STR || leftDt in ArrayDatatypes || rightDt in ArrayDatatypes) {
errors.err("missing & (address-of) on the string operand", expr.position)
errors.err("missing & (address-of) on the operand", expr.position)
return
}
}