ID:2031994
 
Not a bug
BYOND Version:510.1322
Operating System:Windows 7 Ultimate
Web Browser:Chrome 48.0.2564.103
Applies to:Dream Maker
Status: Not a bug

This is not a bug. It may be an incorrect use of syntax or a limitation in the software. For further discussion on the matter, please consult the BYOND forums.
Descriptive Problem Summary:
Splittext include_delimiters can't be used as named argument.

Numbered Steps to Reproduce Problem:
Try to compile the attached snippet in 510

Code Snippet (if applicable) to Reproduce Problem:
/mob/verb/test()
var/word = "a,b,c"
var/sep = ","
var/list/test = list()
test = splittext(word,sep,include_delimiters=1)
for(var/a in test)
world << a


Expected Results:
Build passes
Actual Results:
error: splittext: expected 2 to 5 arguments (found 1)

When does the problem NOT occur?

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.) 510 only proc

Workarounds:
replacing it with splittext(word,sep,1,0,1)
Not a bug; I'm pretty sure only procedures attached to objects can use named arguments.

The majority of non-datumic functions do not support named args.
Such a limitation doesn't exist.

In game code global procs can use named args, and i know for sure the built in animated() can use named args.
In response to MrStonedOne
MrStonedOne wrote:
Such a limitation doesn't exist.

In game code global procs can use named args, and i know for sure the built in animated() can use named args.

animate() is one of the few that does support named args, as it was designed with the ability to use named args; where as most non-datumic functions were not.

This is the same limitation as the usage of arglist(), as far as I'm aware.

Functions that don't support named args or arglist are *supposed* to give the compiler error:
arglist: arglist() or named arguments cannot be used here

But, for some procs (especially ones with strict arg-lengths) give the expected x to y args error.

If it's expected, the documentation should be changed to reflect that. If it isn't, it should be fixed.

This is simple stuff.
the documentation for named args states that not all functions support named args, and those that due (generally) state that they do support named args.
Lummox JR resolved issue (Not a bug)
SSX is correct. The documentation for named args states that most built-in procs don't support it.
Isn't the 'bug' rather that the compiler error doesn't show up?