diff --git a/compiler/res/prog8lib/cx16/diskio.p8 b/compiler/res/prog8lib/cx16/diskio.p8 index bfc701703..712c91ea2 100644 --- a/compiler/res/prog8lib/cx16/diskio.p8 +++ b/compiler/res/prog8lib/cx16/diskio.p8 @@ -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) diff --git a/compiler/res/prog8lib/diskio.p8 b/compiler/res/prog8lib/diskio.p8 index 60ec44b5e..15ffb91b2 100644 --- a/compiler/res/prog8lib/diskio.p8 +++ b/compiler/res/prog8lib/diskio.p8 @@ -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) diff --git a/compiler/src/prog8/compiler/astprocessing/AstChecker.kt b/compiler/src/prog8/compiler/astprocessing/AstChecker.kt index f089be22b..d92b45df7 100644 --- a/compiler/src/prog8/compiler/astprocessing/AstChecker.kt +++ b/compiler/src/prog8/compiler/astprocessing/AstChecker.kt @@ -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 } }