diff --git a/lang/boolean.c b/lang/boolean.c index c2fe8d6..fcb7dfa 100644 --- a/lang/boolean.c +++ b/lang/boolean.c @@ -30,17 +30,17 @@ return boolean->value; } -static void boolean_not(VmState state, Object obj, void *priv) { +static void boolean_invert(VmState state, Object obj, void *priv) { (void)priv; int arg_count = vm_stack_depth(state); - abort_if(arg_count != 1, "boolean_not called with extra arguments"); + abort_if(arg_count != 1, "boolean_invert called with extra arguments"); bool value = boolean_value(obj); - bool not = !value; - vm_stack_set(state, 0, boolean_create(not )); + bool invert = !value; + vm_stack_set(state, 0, boolean_create(invert )); } static struct object_call calls[] = { - {.name = "Not", .handler = boolean_not, .priv = NULL}, + {.name = "Invert", .handler = boolean_invert, .priv = NULL}, {.name = NULL, /* end */}}; static struct object_class boolean_class = { diff --git a/lang/modules/main.txt b/lang/modules/main.txt index f7a9f77..44f26ae 100644 --- a/lang/modules/main.txt +++ b/lang/modules/main.txt @@ -1,6 +1,6 @@ Function BoolTest Set A To True -Set B To A Not +Set B To A Invert Return B EndFunction Function NoneTest