From 296ecefa6ccd9b1c4fab1fc6c696f39d08464d5b Mon Sep 17 00:00:00 2001 From: marcobaye Date: Tue, 23 Jun 2020 15:30:49 +0000 Subject: [PATCH] explained more errors in docs git-svn-id: https://svn.code.sf.net/p/acme-crossass/code-0/trunk@260 4df02467-bbd4-4a76-a152-e7ce94205b78 --- docs/Errors.txt | 11 +++++++++++ src/symbol.c | 6 +++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/docs/Errors.txt b/docs/Errors.txt index 280709c..94fbbde 100644 --- a/docs/Errors.txt +++ b/docs/Errors.txt @@ -255,6 +255,10 @@ File name quotes not found ("" or <>). File names have to be given in quotes. Either "" quoting for files located in the current directory or <> quoting for library files. +Force bits can only be given to numbers. + You tried to give a force bit to a symbol and then assign a string + or list to it. + Found '}' instead of end-of-file. ACME encountered a '}' character when it expected the file to end instead (because no blocks were open). @@ -513,6 +517,9 @@ ArgStackNotEmpty ExtendingListWithItself There were multiple references to the same list. +ForceBitZero + The function to handle force bits was called without a force bit. + IllegalBlockTerminator A RAM block (macro or loop) was terminated incorrectly. @@ -539,6 +546,10 @@ IllegalSymbolNameLength NotEnoughArgs There was not enough data for a dyadic operator to work on. +NullTypeObject + A symbol is used that does not have a type (number/list/string) + associated with it. + OperatorIsNotDyadic OperatorIsNotMonadic A function was passed the wrong type of operator. diff --git a/src/symbol.c b/src/symbol.c index e9e0744..c04db6b 100644 --- a/src/symbol.c +++ b/src/symbol.c @@ -175,12 +175,12 @@ void symbol_set_object(struct symbol *symbol, struct object *new_value, bits pow void symbol_set_force_bit(struct symbol *symbol, bits force_bit) { if (!force_bit) - Bug_found("ForceBitZero", 0); // FIXME - add to docs! + Bug_found("ForceBitZero", 0); if (symbol->object.type == NULL) - Bug_found("NullObject", 0); // FIXME - add to docs! + Bug_found("NullTypeObject", 0); if (symbol->object.type != &type_number) { - Throw_error("Force bits can only be given to numbers."); // FIXME - add to docs! + Throw_error("Force bits can only be given to numbers."); return; }