------------------------------------------------------------------------
*From:* ToddAndMargo via perl6-users <perl6-us...@perl.org>
*Sent:* Tuesday, December 31, 2019 8:53 PM
*To:* perl6-users <perl6-us...@perl.org>
*Subject:* NativeCall bug: can't find final ')'
perl6 -I. -e "use WinReg :WinReadRegKey; say WinReadRegKey(
HKEY_LOCAL_MACHINE,
Q[SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\system],
Q[EnableLUA] );"
===SORRY!=== Error while compiling K:\Windows\NtUtil\WinReg.pm6 (WinReg)
Unable to parse expression in argument list; couldn't find final ')'
(corresponding starter was at line 178) at K:\Windows\NtUtil\WinReg.pm6
(WinReg):178
------> eName, DWORD, REG_SZ, $lpData, $lpcbData<HERE> is rw );
expecting any of:
infix
infix stopper
"final ')' " is a bad error. The actual error is that NativeCall does
not like the "is rw". Please fix.
Many thanks,
-T
On 2020-01-02 08:26, Andy Bach wrote:
Just a guess, but isn't it possible that this is a quoting problem?
Doing work from the Winx cmd line and trying to match up the
single/double quote/multi-line mess is a way towards madness ... if you
put your "-e" program in a file and run that, do you get a different error?
Just my 2 cents, but when ever I think I've come across a "bug" in the
programming language, I always think again. 99.99999% of the time, it's
really me, not the language.
a
Hi Andy,
Possibly. Probably some error in NativeCall as you
posit.
That is not the only quirk. By default, variable in Raku
sub declarations are "is ro" (read only). By in Native
Call, you get information back in them. And don't
dare call them "is rw" if they are not C pointers translations,
or your will get the missing ")" error.
I am slowing writing this all down and will echo back
to the list when I get to a good stopping point.
Life in the fast lane! I could be writing in actual C.
AAAAHHHHHH!!!! I don't know how those guys do it without
going insane. My hat is off to them.
-T
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Serious error.
All shortcuts have disappeared.
Screen. Mind. Both are blank.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~