CompuServe Thread

Forum unknown · Programming

#Modula Problem

1 messages in this thread
#23270From: John MesiavechJun 17, 1986 6:00 PM
hi! Am writing a program in Modula-2 and am getting an annoying problem, which is this: In the program, i have a procedure called OpenLibraries, defined as such: PROCEDURE OpenLibraries () : BOOLEAN' (* oops, replace above with semicolon*) IntuitionBase:= OpenLibrary (IntuitionName,0); IF IntuitionBase = 0 THEN RETURN FALSE END; GraphicsBase:=OpenLibrary (GraphicsName,0); IF GraphicsBase = 0 THEN RETURN FALSE END; RETURN TRUE; END OpenLibraries; In addition, have a variable in the VAR section defined as: VAR Dummy : BOOLEAN; Now, in the main program, when I do this: Dummy:=OpenLibraries; I keep getting a type mismatch error. Now, as the procedure returns a Boolean and the variable IS Boolean, what's going on? This is the ONLY error in the entire program, and is quite frustrating! Any help would be appreciated…Please reply in EasyPlex, since am going on a trip and won't be back in a while…Thanks!