Jose's Read Only Forum 2023

IT-Consultant: Charles Pegge => OxygenBasic => Topic started by: Brian Alvarez on October 01, 2018, 11:44:24 PM

Title: Understanding Oxygen's error messages
Post by: Brian Alvarez on October 01, 2018, 11:44:24 PM

Instead of having to guess or look everywhere, i would like to have this centralized post as a reference to compile time errors, and someone who knows
can reply explaining what to do? if possible?

Error:
unable to match param names

Code:

IF (hiword(wParam)=chr(0)) THEN
       MSGBOX " Button 1 is clicked "
END IF


Details:
The MSGBOX function is defined as follows:
FUNCTION MSGBOX(string sText, sys mOptions, string sCaption = "") AS LONG
' no code yet.
END FUNCTION
Title: Re: Understanding Oxygen's error messages
Post by: Brian Alvarez on October 01, 2018, 11:46:42 PM
A non optional parameter was omitted.

Perhaps a more apropriate error description would be, "missing non-optional parameter"?
Title: Re: Understanding Oxygen's error messages
Post by: Brian Alvarez on October 01, 2018, 11:47:40 PM
How about this one:

Linker found unidentified names:
::cb   level 0

Details:
None, no error line or extra details are provided.
Title: Re: Understanding Oxygen's error messages
Post by: Brian Alvarez on October 01, 2018, 11:49:14 PM
Perhaps... Undefined variable?
Title: Re: Understanding Oxygen's error messages
Post by: Charles Pegge on October 02, 2018, 02:38:08 PM
Hi Brian,

Your feedback on error reporting is most welcome.

I have made some improvements to the error reporting system, particularly for linker errors. More information is carried through to the linker in the next o2. It is self-compiled, and I am sitting on it like a broody hen :)
Title: Re: Understanding Oxygen's error messages
Post by: Chris Chancellor on October 02, 2018, 03:08:13 PM
Yes,  this is the spirit about O2

We learn as we go along and evolve O2 to become a more better compiler.  do the baby steps first
and soon we will be better off