1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-09 23:35:13 +00:00
QB64-PE/source
Matthew Kilgore 83533dc319 Add support for optional function arguments
Currently functions only have very limited optional argument support,
this expands it so that we can have more complex sets of optional
arguments for functions, such as multiple arguments where not all need
to be provided. This will be used in the future for some upcoming
functionality.

Note that this does not support any generic optional argument format,
the commas always have to be provided unless an optional argument is at
the end of the parameter list. Thus, if you have a format with two
optional arguments and you want to omit the second, then you need to call
it as 'foo(2, , 3)`, rather than `foo(2, 3)`. This is important for
avoiding ambiguous situations, and is how many SUBs currently function.

The two functions that violate that requirement are INSTR() and
_INSTRREV(), which use the format `[?],?,?` and allow omitting the comma
for the first argument. This format is simply handled as a special case.

Fixes: #303
2023-02-12 22:38:50 -05:00
..
global Context work 2023-01-19 23:41:38 +01:00
ide General refactoring 2023-02-12 19:47:01 +01:00
subs_functions Fix arg count for _SNDNEW and type for _COLORCHOOSERDIALOG 2023-02-06 18:50:03 +05:30
utilities Add support for optional function arguments 2023-02-12 22:38:50 -05:00
.gitignore Don't ignore .bas files in source directory 2022-04-28 17:20:45 -04:00
peLogo.png Step 10: Update remaining stuff 2022-08-12 02:54:12 +02:00
qb64pe.bas Add support for optional function arguments 2023-02-12 22:38:50 -05:00
qb64pe.ico Step 4: Update Windows icon & resource file 2022-08-10 02:03:12 +02:00
qb64pe.png Step 2: Update Linux icon file 2022-08-10 00:48:56 +02:00