Open StephanWald opened 3 days ago
@dhuebner can you please have a look at my branch https://github.com/BBx-Kitchen/bbj-language-server/tree/issue_179_functions and the following sample that shows correct and incorrect usage of some functions. I'd need to understand how to correctly specify the types in the bbl / ts function:
REM correct
? ABS(2.6)
REM incorrect
? ABS("UU")
REM correct
? ADJN(2)
REM incorrect
? ADJN("2")
rem correct
? AND("U","J")
rem incorrect
? AND(3,8)
rem incorrect
? AND("U",8)
rem correct
? ARGV(0)
? ARGV(1,err=*next)
rem incorrect
? ARGV()
? ARGV("TEST")
These functions are defined in library files ending with BBL file extension. @StephanWald pointed out that some of these definitions are wrong. We should go through them and correct them if necessary.
Plus the validation of the function parameters should be done here: #193
correct them if necessary.
...respectively tell us what is wrong, we can have others do the dull work...
There appears to be a larger number of functions not yet implemented:
https://documentation.basis.cloud/BASISHelp/WebHelp/commands/Alphabetical_Functions.htm
Before filling the missing ones there is clarification needed:
The following function seems implemented, also with the argument being defined as string.
Only the second one is valid. Why are the first and the third not flagged as error? And why do we see this underline in the popup?
https://github.com/BBx-Kitchen/bbj-language-server/blob/82a7b9164089e682e0c8134daa8893b687877740/bbj-vscode/src/language/lib/functions.bbl#L51-L57