Previous Thread
Next Thread
Print Thread
Page 1 of 3 1 2 3
6.5.1713.0 compiler issues #35104 08 Apr 22 12:59 PM
Joined: Nov 2006
Posts: 2,223
S
Stephen Funkhouser Offline OP
Member
OP Offline
Member
S
Joined: Nov 2006
Posts: 2,223
I've 2 issues.

1. programs aren't compiling with "undefined named parameter:" they previously compiled.
I've attached an LSX file compiled with 6.5.1707.1 / 6.5(953) hopefully that helps.
2. When compiling multiple programs I what's in the attached image and it aborts the program after 36 attempted compilations

Attached Files compiler-error.jpg
compiler.lsx.gpg (385.54 KB, 77 downloads)
SHA1: 920b65b6a0b43be64be20c34b1ace2eed909dab9
Last edited by Stephen Funkhouser; 08 Apr 22 12:59 PM.

Stephen Funkhouser
Diversified Data Solutions
Re: 6.5.1713.0 compiler issues [Re: Stephen Funkhouser] #35105 08 Apr 22 03:57 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
I'm having trouble with the gpg decrypt (which I emailed you about).
But regarding the first error, almost certainly it's due to this...
Quote

============================================================================
A-Shell Release Notes Version 6.5.1712.4 (20 March 2022)
============================================================================
2. Compiler bug fix (edit 975) - named parameter references to arrays
(byref) were incorrectly accepting scalar parameter name syntax. For example,
for a function defined as follows ...

function fn'foo(aaa() as ST_ARRAY)

the compiler was accepting the following call ...

call fn'foo(aaa=bbb())

whereas since the formal parameter is an array, it should have required
array syntax for the name reference, e.g. ...

call fn'foo(aaa()=bbb())

Somewhat worse, an attempt to use the correct syntax (as shown above) would
have resulted in a mysterious compilation error -- unmapped variable for
aaa().

Worse still, if the local array had the same name as the formal array
parameter, e.g. ...

call fn'foo(aaa()=aaa())

... it accepted the syntax, but compiled the call incorrectly, mistaking the
format named parameter aaa() for the locally defined aaa(), which almost certainly
would have caused a crash at runtime.

The good news is none of these problems were likely to affect production
systems. But the bad news is that you may now get a compiler error when
compiling code using the incorrect fn'foo(aaa=bbb()) syntax, even though
it previously compiled ok. Fortunately the fix is simple, and hopefully
obvious.


It's unfortunate that the fix can't be backward compatible, but I'm not sure it's possible here.

The second problem I don't have any clues about yet. Are you compiling multiple programs within a CMD file within a single A-Shell session? Or are these calls to the standalone compiler. In the former case, it sounds like some resource being used up. But in the latter case that wouldn't be applicable and suggests something even more sinister.

Re: 6.5.1713.0 compiler issues [Re: Stephen Funkhouser] #35106 08 Apr 22 04:44 PM
Joined: Nov 2006
Posts: 2,223
S
Stephen Funkhouser Offline OP
Member
OP Offline
Member
S
Joined: Nov 2006
Posts: 2,223
we have written a mass compiler in BASIC using the compiler XCALL interface. That's actually the LSX file I posted.

Last edited by Stephen Funkhouser; 08 Apr 22 04:45 PM.

Stephen Funkhouser
Diversified Data Solutions
Re: 6.5.1713.0 compiler issues [Re: Stephen Funkhouser] #35107 08 Apr 22 07:26 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
I think the first problem is resolved in compiler edit 978 within 6.5.1714.1 .

I'm not sure about the second problem, although I was able to compile your monster compiler.lsx file 50 times in a row without any repercussions.

ash-6.5.1714.1-el7-upd.tz
compil-6.5.978-w32.zip

Re: 6.5.1713.0 compiler issues [Re: Stephen Funkhouser] #35108 08 Apr 22 07:47 PM
Joined: Nov 2006
Posts: 2,223
S
Stephen Funkhouser Offline OP
Member
OP Offline
Member
S
Joined: Nov 2006
Posts: 2,223
Out of curiosity, what exactly did you fix? I have found (and am resolving) instances of the code not compiling because of 6.5.1712.4 what other issue was there?


Stephen Funkhouser
Diversified Data Solutions
Re: 6.5.1713.0 compiler issues [Re: Stephen Funkhouser] #35109 08 Apr 22 09:34 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
The compiler fix in 978 was to deal with a small glitch in the logic that matches up named parameters specified in the call with the equivalent named parameter in the definition. It wasn't handling the case of a parameter like $ary()=.NULL as ordmap(varstr;varstr). It was working fine for scalar parameters and for arrays without initializers.

Re: 6.5.1713.0 compiler issues [Re: Stephen Funkhouser] #35110 08 Apr 22 10:21 PM
Joined: Nov 2006
Posts: 2,223
S
Stephen Funkhouser Offline OP
Member
OP Offline
Member
S
Joined: Nov 2006
Posts: 2,223
Thanks for the info. The second issue is still occurring when I bulk compile, so any traces I can enable that might be helpful?


Stephen Funkhouser
Diversified Data Solutions
Re: 6.5.1713.0 compiler issues [Re: Stephen Funkhouser] #35111 08 Apr 22 10:50 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
I'm not quite sure what I'm looking at in the image of the errors. It looks like a SEGV or core-dump type message, but you normally can only that once before your session is hosed. But the XCALL interface to the compiler runs within the caller's session, so that doesn't quite make sense. Is there anything useful in the ashlog? Does it always occur after the same number of compiles? Or after a particular program? Does increasing the memory size have any effect on it?

Re: 6.5.1713.0 compiler issues [Re: Stephen Funkhouser] #35112 08 Apr 22 11:07 PM
Joined: Nov 2006
Posts: 2,223
S
Stephen Funkhouser Offline OP
Member
OP Offline
Member
S
Joined: Nov 2006
Posts: 2,223
How does one increase the memory for the XCALL compiler interface?


Stephen Funkhouser
Diversified Data Solutions
Re: 6.5.1713.0 compiler issues [Re: Stephen Funkhouser] #35113 08 Apr 22 11:12 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
I think the only option is to increase the memory of the job, either in the MIAME.INI or by executing a MEMORY command at the dot prompt. Normally you would get an out-of-memory error if that were the issue, but it may be an edge case. Or it may be that it eventually dies no matter what (because it is failing to release something) but takes longer depending on how much you start with.

Re: 6.5.1713.0 compiler issues [Re: Stephen Funkhouser] #35114 09 Apr 22 08:56 PM
Joined: Nov 2006
Posts: 2,223
S
Stephen Funkhouser Offline OP
Member
OP Offline
Member
S
Joined: Nov 2006
Posts: 2,223
It was failing originally with 25MB after 33 compile attempts. Increased it to 50MB as failed at 33 again. 500MB still fails at 33 compiles.


Stephen Funkhouser
Diversified Data Solutions
Re: 6.5.1713.0 compiler issues [Re: Stephen Funkhouser] #35115 09 Apr 22 10:41 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
Doesn't appear to be related to memory then.
Is it the same program being compiled 33 times, or 33 different programs?
Is it always the same program that fails?
Anything show up in the ashlog?

Re: 6.5.1713.0 compiler issues [Re: Stephen Funkhouser] #35116 10 Apr 22 06:12 PM
Joined: Nov 2006
Posts: 2,223
S
Stephen Funkhouser Offline OP
Member
OP Offline
Member
S
Joined: Nov 2006
Posts: 2,223
Now that I've got the code fixed updated to not error for the array named parameter issue, it is able to go through all 1350 programs multiple times


Stephen Funkhouser
Diversified Data Solutions
Re: 6.5.1713.0 compiler issues [Re: Stephen Funkhouser] #35117 11 Apr 22 05:00 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
I guess we can attribute the unceremonious abort after 33 error-filled compiles to the "programmer sympathy" module that protects you from being overwhelmed by too many errors at once. cool

Re: 6.5.1713.0 compiler issues [Re: Stephen Funkhouser] #35118 11 Apr 22 06:54 PM
Joined: Nov 2006
Posts: 2,223
S
Stephen Funkhouser Offline OP
Member
OP Offline
Member
S
Joined: Nov 2006
Posts: 2,223
Seeing some random syntax errors when not using named parameters. You can see the compiler syntax error below. There are other calls not using named parameters to the same function that compile.


Code
ACCOUNTING.BSI[160,4]:295: ?Syntax error  - exitcode = fn'accounting_gen'je_add(2)

! function signature
FUNCTION fn'accounting_gen'je_add(mode as b1,gen'je'rec as GEN'JE'RECORD_STRUCT) as f6



Also, the following is giving me a syntax error but other lines formatted the exact same way compile.

Code
				f$ += Fn'Sprintf$("(i.special_order_item!='Y' AND i.website_flags & %d!=%d)", INV1_WEBSITE_EXCLUDE'STOCK, INV1_WEBSITE_EXCLUDE'STOCK)


All of these programs compiled successfully prior to 6.5.1712.4.

Once we get past fixing the syntax issues I can revert my code to see if the abort is still reproducible.

Last edited by Stephen Funkhouser; 11 Apr 22 06:57 PM.

Stephen Funkhouser
Diversified Data Solutions
Re: 6.5.1713.0 compiler issues [Re: Stephen Funkhouser] #35119 11 Apr 22 07:18 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
It does seem that there may be a floating gremlin or two causing spurious syntax errors, as if some variable wasn't getting properly initialized. It's really hard to track such problems down though without a reproducible case. (As you probably already realize, neither of the above generate errors in a simple test.) If you can send me an LSX that fails, it would definitely help.

Re: 6.5.1713.0 compiler issues [Re: Stephen Funkhouser] #35120 11 Apr 22 08:43 PM
Joined: Nov 2006
Posts: 2,223
S
Stephen Funkhouser Offline OP
Member
OP Offline
Member
S
Joined: Nov 2006
Posts: 2,223
There are 2 program LSX files in this archive. INVDESC was erroring with inventory.bsi message and PREPD was erroring with the accounting.bsi message.

These LSX files were generated with 6.5.1707.1, but they don't compile with 6.5.17141.1

Attached Files
6.5.1714.1_syntax_error.zip.gpg (2.54 MB, 96 downloads)
SHA1: d5be1142f18971a6104cab1265813c8f17b09c6a
Last edited by Stephen Funkhouser; 11 Apr 22 08:45 PM.

Stephen Funkhouser
Diversified Data Solutions
Re: 6.5.1713.0 compiler issues [Re: Stephen Funkhouser] #35121 12 Apr 22 12:34 AM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
I'm getting errors of the original type (i.e. missing parens in a named parameter), e.g.
Code
DIRECTORY'BSI:10664: ?Undefined named parameter:  - .fn = fn'file_append(outfile$=outfile$%c aryct=1%c ary=ary()%c clear'outfile=clear'outfile%c formfeed=formfeed) <<ary>>
DIRECTORY'BSI:11157: ?Undefined named parameter:  - CALL fn'file_conf_path_find_helper_set'default'paths(paths$=final'paths$()) <<paths$>>
DIRECTORY'BSI:11161: ?Undefined named parameter:  - CALL fn'file_conf_path_find_helper_set'default'paths(paths$=final'paths$()) <<paths$>>
DIRECTORY'BSI:11172: ?Undefined named parameter:  - CALL fn'file_conf_path_find_helper_set'default'paths(paths$=final'paths$()) <<paths$>>
INVDESC'GEN:171521: ?Undefined named parameter:  - aryst.meta'hash$ = fn'hash_ordmap_varstr'x$(type=6%c $key=$dlg'invdesc_xtr'linked'items_meta()) <<$key>>


Code
FUNCTION fn'file_conf_path_find_helper_set'default'paths(paths$() as FN'FILE_CONF_PATH_FIND_PATH_STRUCT,dummy=0 as b1:OUTPUTONLY) as f8
...
FUNCTION fn'file_append(outfile$ as s0:INPUTONLY,aryct as f8:INPUTONLY,ary() as FILE_APPEND_STRUCT,clear'outfile=1 as f8:INPUTONLY,formfeed=1 as f8:INPUTONLY) as f8
...
FUNCTION fn'hash_ordmap_varstr'x$(type as b4:INPUTONLY,$key() as ordmap(varstr;varx),dummy=0 as b1:OUTPUTONLY) as s0


(I'm also getting some unrelated spurious errors which appear to be artifacts of the LSX logic, but I suspect you won't see those in a standard compile.)

Are you sure your version doesn't have the above errors? Is it the case they weren't being spotted?

Re: 6.5.1713.0 compiler issues [Re: Stephen Funkhouser] #35122 12 Apr 22 12:48 AM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
Wait, the two LSX files you sent appear to have been generated by a much older version of the compiler -- 6.5.953 rather than 6.5.978 (at least according to the LSX header). Perhaps that was by design (because the latest compiler fails to generate a good LSX due to the errors?), but it certainly explains why the above errors are still in there. It may also explain the other errors I'm getting in compiling the LSX. Maybe we should try again with LSX files created by the latest compiler. (I think the LSX shouldn't be too affected by syntax errors in the compilation.)

Re: 6.5.1713.0 compiler issues [Re: Stephen Funkhouser] #35123 12 Apr 22 01:05 PM
Joined: Nov 2006
Posts: 2,223
S
Stephen Funkhouser Offline OP
Member
OP Offline
Member
S
Joined: Nov 2006
Posts: 2,223
Sorry about that. I forgot you still get the LSX file when compilation errors occur. I've attached the same programs but generated from 6.5(978).

Attached Files
6.5.1714.1_v2.zip.gpg (2.56 MB, 96 downloads)
SHA1: f6745cff857efd7428c48f27fa13d4a182defca7

Stephen Funkhouser
Diversified Data Solutions
Re: 6.5.1713.0 compiler issues [Re: Stephen Funkhouser] #35124 12 Apr 22 03:07 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
Ok, the new set it definitely different, and has at least one example of a spurious "undefined named parameter" error. Let me investigate and get back to you ...

Re: 6.5.1713.0 compiler issues [Re: Stephen Funkhouser] #35125 12 Apr 22 04:14 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
Try it with this version ...

ash-6.5.1714.2-el7-upd.tz
(sha1: f8189f8b20232ae92ea54407378e2fca8dda2688)

This contains compiler edit 979, which isn't actually any different at the source level, but I've dialed back the C compiler optimization, which seems to have eliminated most of spurious errors. (There are still some, but they appear to be due to some problem specific to the LSX; not yet sure whether it's in the LSX itself or in the interpreting of the the pseudo-include operations, but it is eventually losing track of the nesting level.) If this actually solves the problem, it's going to lead to a painful investigation into compiler optimization in order to try to figure out whether it's a problem/limitation in the C compiler optimization related to the size and complexity of the source code, or a problem in the source code that only gets exposed with certain optimizations. But the difference in compiler speed seems to be negligible.

Re: 6.5.1713.0 compiler issues [Re: Stephen Funkhouser] #35126 12 Apr 22 05:21 PM
Joined: Nov 2006
Posts: 2,223
S
Stephen Funkhouser Offline OP
Member
OP Offline
Member
S
Joined: Nov 2006
Posts: 2,223
Initial report...those 2 programs compile. Moving to compile all going to take 1-2 hours.


Stephen Funkhouser
Diversified Data Solutions
Re: 6.5.1713.0 compiler issues [Re: Stephen Funkhouser] #35127 12 Apr 22 08:27 PM
Joined: Nov 2006
Posts: 2,223
S
Stephen Funkhouser Offline OP
Member
OP Offline
Member
S
Joined: Nov 2006
Posts: 2,223
Alright, all programs compiled.


Stephen Funkhouser
Diversified Data Solutions
Re: 6.5.1713.0 compiler issues [Re: Stephen Funkhouser] #35128 12 Apr 22 09:12 PM
Joined: Nov 2006
Posts: 2,223
S
Stephen Funkhouser Offline OP
Member
OP Offline
Member
S
Joined: Nov 2006
Posts: 2,223
Spoke too soon.

Moved on to another customer code base and found this one. I've attached an LSX file for this one.

Code
fulsurchg.bsi[130,0]:1047: ?Cannot input to outputonly arg  - XGETARG 1%coe'header'key


Here's the snippet of the function signature down to the XGETARG that's erroring, as you can see the function has no formal parameters defined.
Code
FUNCTION fn'fulsurchg_comment_display'last$() as s180

++INCLUDE maps:status.map
++INCLUDE maps:surcharge.map

MAP1 locals
	MAP2 prgnam$			,s,10
	MAP2 surcharge'program	,s,2
	MAP2 unique			,i,1

MAP1 channel'params
	MAP2 channel'status		,f,6
	MAP2 channel'surcharge	,f,6

MAP1 key'params
	MAP2 key'status		,f,6
	MAP2 key'surcharge		,f,6
	MAP2 key'surcharge'last	,f,6

MAP1 oe'header'key
	MAP2 oe'cust'number		,s,6
	MAP2 oe'order'number	,s,8
	MAP2 oe'site			,s,2

	XGETARG 1,oe'header'key


Attached Files
6.5.1714.2.zip.gpg (561.6 KB, 91 downloads)
SHA1: 7000adb8107dc9bf2bf5a948e56ac553b6366a47
Last edited by Stephen Funkhouser; 12 Apr 22 09:23 PM.

Stephen Funkhouser
Diversified Data Solutions
Re: 6.5.1713.0 compiler issues [Re: Stephen Funkhouser] #35129 12 Apr 22 11:07 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
This is an interesting one, introduced back in Dec 2020 with the Implicit Function Return Value Capture feature.

The implementation effectively adds an additional outputonly parameter to the parameter structure, allowing the function to pass back the value into an internal variable set up by the compiler when you use the dot prefix for calling a function.

That seemed like a good idea, except in this scenario, where the function tries to XGETARG one more argument than is declared.

Here's an update which fixes that problem by treating any XGETARG operation beyond the declared parameter list to be allowed (within certain limits)...

ash-6.5.1714.3-el7-upd.tz
(sha1: e9cb5808bf20f028a96d6bfb166154c75ff61559)

It doesn't fix the problem where you try to use the implicit returned value of a function that you pass more arguments to than it declares. I think that may just need to a documented limitation, but it's sufficiently rare/obscure that it isn't urgent. And at the rate we're going, I wouldn't be surprised if this isn't the end of your bug reports!

Last edited by Jack McGregor; 12 Apr 22 11:09 PM.
Re: 6.5.1713.0 compiler issues [Re: Stephen Funkhouser] #35130 13 Apr 22 08:34 PM
Joined: Nov 2006
Posts: 2,223
S
Stephen Funkhouser Offline OP
Member
OP Offline
Member
S
Joined: Nov 2006
Posts: 2,223
Took a while to get it tested. I didn't run into any other bugs yet.


Stephen Funkhouser
Diversified Data Solutions
Re: 6.5.1713.0 compiler issues [Re: Stephen Funkhouser] #35146 18 Apr 22 09:52 PM
Joined: Nov 2006
Posts: 2,223
S
Stephen Funkhouser Offline OP
Member
OP Offline
Member
S
Joined: Nov 2006
Posts: 2,223
Running into more "?Named params require func/proc definition errors". I've attached both an LSX and LST compiler error file.

Attached Files
coop_oe01.7z.gpg (1.83 MB, 78 downloads)
SHA1: dabb58ca097fb9c44c776a69a5de2e896269a576

Stephen Funkhouser
Diversified Data Solutions
Re: 6.5.1713.0 compiler issues [Re: Stephen Funkhouser] #35147 18 Apr 22 10:23 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
This is a quirky. Not sure if it's really a compiler bug or just a very confusing set of overlapping conditionals and ++includes. Probably too complicated to discuss here productively - I'll email you instead. But in the meantime, I'm curious whether adding /igoo has any effect on it. (All of your previous examples add that switch, and that's one that will affect the LSX file.

Re: 6.5.1713.0 compiler issues [Re: Stephen Funkhouser] #35149 19 Apr 22 12:58 PM
Joined: Nov 2006
Posts: 2,223
S
Stephen Funkhouser Offline OP
Member
OP Offline
Member
S
Joined: Nov 2006
Posts: 2,223
Resolved with the /igoo switch.


Stephen Funkhouser
Diversified Data Solutions
Re: 6.5.1713.0 compiler issues [Re: Stephen Funkhouser] #35151 19 Apr 22 02:46 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
Interesting. The lingering question in my mind is why the /igoo switch solved the problem when the ++IFNDEF <symbol> test at the top of the include file didn't. Unfortunately it's not the easiest study case (with over 2700 functions and over 7000 ++include statements nested up to 10 levels deep!!!). But I would be curious to see a the actual source for that one fnpayment.bsi file (since the way it got rendered into the LSX has left me confused).

Re: 6.5.1713.0 compiler issues [Re: Stephen Funkhouser] #35152 19 Apr 22 09:40 PM
Joined: Nov 2006
Posts: 2,223
S
Stephen Funkhouser Offline OP
Member
OP Offline
Member
S
Joined: Nov 2006
Posts: 2,223
This was a development environment I don't use very often and there were some issues in the miame.ini with some missing ersatz definitions. So, perhaps the missing includes caused all sorts of chaos.


Stephen Funkhouser
Diversified Data Solutions
Re: 6.5.1713.0 compiler issues [Re: Stephen Funkhouser] #35155 21 Apr 22 01:13 PM
Joined: Nov 2006
Posts: 2,223
S
Stephen Funkhouser Offline OP
Member
OP Offline
Member
S
Joined: Nov 2006
Posts: 2,223
Does this "named parameter references to arrays" issue apply to XCALL named parameters as well because those still use scalar names?

i.e.
Code
XCALL ORDERFILL, cmdhdr=orderfill'cmdhdr, ary=orderfill'ary()


Stephen Funkhouser
Diversified Data Solutions
Re: 6.5.1713.0 compiler issues [Re: Stephen Funkhouser] #35156 21 Apr 22 04:20 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
Right. I failed to extend the compiler fix in edit 978 to cover the DEFXCALL / XCALL case. I think this is resolved now in 6.5.1715.5 (compiler edit 981) ...

ash65notes.txt
ash-6.5.1715.5-w32-upd.zip
ash-6.5.1715.5-w32c-upd.zip
compil-6.5.981-w32.zip
ash-6.5.1715.5-el7-upd.tz

Re: 6.5.1713.0 compiler issues [Re: Stephen Funkhouser] #35157 21 Apr 22 08:49 PM
Joined: Nov 2006
Posts: 2,223
S
Stephen Funkhouser Offline OP
Member
OP Offline
Member
S
Joined: Nov 2006
Posts: 2,223
Seeings syntax errors for built-in A-Shell calls when passing an instance of an array element. Attached LSX

Attached Files
6.5.1715.5_oe03.lsx.gpg (403.45 KB, 101 downloads)
SHA1: afc08ae426388b5f653d23215bbdcb20922a765e

Stephen Funkhouser
Diversified Data Solutions
Re: 6.5.1713.0 compiler issues [Re: Stephen Funkhouser] #35158 21 Apr 22 09:54 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794

Re: 6.5.1713.0 compiler issues [Re: Stephen Funkhouser] #35159 22 Apr 22 01:25 AM
Joined: Nov 2006
Posts: 2,223
S
Stephen Funkhouser Offline OP
Member
OP Offline
Member
S
Joined: Nov 2006
Posts: 2,223
That program compiles. Will check others tomorrow


Stephen Funkhouser
Diversified Data Solutions
Re: 6.5.1713.0 compiler issues [Re: Stephen Funkhouser] #35160 22 Apr 22 06:51 AM
Joined: Jun 2001
Posts: 3,406
J
Jorge Tavares - UmZero Online Content
Member
Online Content
Member
J
Joined: Jun 2001
Posts: 3,406
Hi,
It seems the new compiler don't like xcall arguments with arrays where the element number have spaces around, like:
xcall xtree,er,ec,array( 1 ), ...

I know, it would be stupid to write that kind of code, but LEO does and I can even fix it there, but thought that should mention this considering the change of behaviour and considering it's not a real error.



As an aside, lovely, the new XTREE validation via SBX, thank you.

Last edited by Jorge Tavares - UmZero; 22 Apr 22 06:54 AM.

Jorge Tavares

UmZero - SoftwareHouse
Brasil/Portugal
Re: 6.5.1713.0 compiler issues [Re: Stephen Funkhouser] #35161 22 Apr 22 04:36 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794

Re: 6.5.1713.0 compiler issues [Re: Stephen Funkhouser] #35162 22 Apr 22 09:33 PM
Joined: Nov 2006
Posts: 2,223
S
Stephen Funkhouser Offline OP
Member
OP Offline
Member
S
Joined: Nov 2006
Posts: 2,223
Compiles, but the DEFXCALL is a little concerning because it's not required to set the named parameter as an array.

If I leave the DEFXCALL named parameter without the parenthesis it compiles as before.

Code
DEFXCALL ORDERLOCK, cmdhdr="", ary=""

XCALL ORDERLOCK, cmdhdr=orderlock'cmdhdr, ary=orderlock'ary()


If I change it to have parenthesis it requires parenthesis in the caller
Code
DEFXCALL ORDERLOCK, cmdhdr="", ary()=""

XCALL ORDERLOCK, cmdhdr=orderlock'cmdhdr, ary()=orderlock'ary()


Both of these compile because DEFXCALL and caller match.

My concern is this requires the programmer doesn't make a mistake in setting up the DEFXCALL. It seems like the compiler should force you to use an array named parameter in the DEFXCALL definition.

Ver: 6.5.1715.7

Last edited by Stephen Funkhouser; 22 Apr 22 09:35 PM.

Stephen Funkhouser
Diversified Data Solutions
Page 1 of 3 1 2 3

Moderated by  Jack McGregor, Ty Griffin 

Powered by UBB.threads™ PHP Forum Software 7.7.3