<div dir="ltr"><div dir="ltr">On Fri, Dec 21, 2018 at 5:39 PM Mattias Gaertner via Pas2js <<a href="mailto:pas2js@lists.freepascal.org">pas2js@lists.freepascal.org</a>> wrote:</div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
The Delphi IDE barks on that. And Lazarus needs to be adapted too.<br></blockquote><div><br></div><div>Delphi IDE barks about external, JSValue, $PUSH, but it compiles using pas2js, so I've used them even so hehe. Please take a look at attached pictures (sorry for attaching them, but I need to show the IDE errors). Notice all lines the IDE marked as red. And the "Structures" window goes crazy.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Maybe better "misuse" a calling convention like stdcall?<br></blockquote><div><br></div><div>Hm... maybe <b>cdecl</b>, since it sounds like "the original parameter order will be kept". :-)</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> Note: since the 'nodefaults' was defined to 'bar', you can declare<br>
> default params using the short way "a,b: integer = 0" or the verbose<br>
> one "a: integer = 0; b: integer = 0".<br>
<br>
The modifier is read *after* parsing the parameter list.<br></blockquote><div><br></div><div>Very interesting. I'll study the compiler internals as soon as possible. Thanks for sharing this info.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Breaking the rule of one param per default value is a different topic.</blockquote><div><br></div><div>Agreed.</div><div> </div></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Silvio Clécio</div></div></div></div>