4D Compiler

2017-04-04 Thread Nigel Greenlee via 4D_Tech
Hi I have always been curious-but really never had to see this in this way. I am currently updating a system which has never been compiled-not with a view to compiling but to clear up syntax errors. So i started with some number of errors(somewhat north of 100)…i cleared some stuff..and then s

Re: 4D Compiler

2017-04-04 Thread Charles Miller via 4D_Tech
On Tue, Apr 4, 2017 at 12:05 PM, Nigel Greenlee via 4D_Tech < 4d_tech@lists.4d.com> wrote: > Just out of curiosity does anyone know why the compiler does this(its a > long time since i have had more than 2 errors in the compiler because i > compile everytime i change a piece of code to check for s

Re: 4D Compiler

2017-04-04 Thread Nigel Greenlee via 4D_Tech
Chuck Yep thats pretty much what i am figuring..but I was just curious if anyone know what the 'trigger points’ that cause it to give up are-if we knew what they were we could clear up those errors first(I have been at this one all day today and most of yesterday) Nigel Greenlee > On 4 Apr 20

Re: 4D Compiler

2017-04-04 Thread Charles Miller via 4D_Tech
On Tue, Apr 4, 2017 at 12:23 PM, Nigel Greenlee via 4D_Tech < 4d_tech@lists.4d.com> wrote: > Chuck > > Yep thats pretty much what i am figuring..but I was just curious if anyone > know what the 'trigger points’ that cause it to give up are-if we knew what > they were we could clear up those errors

Re: 4D Compiler

2017-04-04 Thread Nigel Greenlee via 4D_Tech
Chuck If it was closer to the days when i wrote load of errors i might have worked out(but then i was so daft i could not have worked it out)..now that i am clever enough to work it out i don’t need to work it out because i don't write 100s of errors …end of a long day clearing 100*n errors ge

RE: 4D Compiler

2017-04-04 Thread Timothy Penner via 4D_Tech
Maybe related to this? ACI0096385 [135142] Check Syntax Error Count Not Consistent. ^ Still in progress. ^ filed for v15.x / 16.x / 16R2 * I thought this was database specific though. The bug description explains that it's just the number that seems wrong, but the actual list seems correct. A wor

Re: 4D Compiler

2017-04-04 Thread Nigel Greenlee via 4D_Tech
Tim Oh that this was V15!!!..its not a complaint about the compiler its doing a a damned fine job here its like Mr Trebus living room(https://en.wikipedia.org/wiki/Edmund_Trebus) > On 4 Apr 2017, at 17:31, Charles Miller via 4D_Tech <4d_tech@lists.4d.com> > wrote: > > On Tue, Apr 4, 2017 at 1

Re: 4D Compiler

2017-04-04 Thread David Adams via 4D_Tech
Nigel, The Compiler changed some versions back and no longer detects all error sin one pass...at least in certain situations. A few tips and things to look out for: * If you've got a missing method, the Compiler usually stops reporting errors, even if there are multiple cases of the problem. * S

Re: 4D Compiler

2017-04-05 Thread Nigel Greenlee via 4D_Tech
David Thanks for the insight. I think i might try that-day 2 and half already of this! Hopefully the compile with ‘all vars are declared should show me what is not declared(!)…i would love to be able to run my code(which i spoke about on here) that now auto sets the declarations of variables at

Re: 4D Compiler

2017-04-06 Thread Douglas von Roeder via 4D_Tech
Nigel: A couple of thoughts on this… I couldn't find this documented but 4D's compiler does three "passes" through the source code (when you're not typing all of your variables). IIRC, the compiler displays what it's doing for each pass but newer versions of 4D + modern hardware are so fast that

Re: 4D Compiler

2017-04-06 Thread Tim Nevels via 4D_Tech
$2, etc and types them. If you are doing the typing then it gets this info from “Compiler…” methods. Then you have local variables to deal with. Could be it builds this typing list when it is scanning all the methods. Could be during all this typing scanning it does some syntax checking along the wa

Re: 4D Compiler

2017-04-06 Thread Douglas von Roeder via 4D_Tech
typing all variables then it first looks at the “Compiler…” methods > for variable typing. > > It also has to type all parameters for methods. So if you let 4D do all > the typing it has to scan all methods looking for $1, $2, etc and types > them. If you are doing the typing then

Re: 4D Compiler

2017-04-06 Thread Lee Hinde via 4D_Tech
On Apr 6, 2017, at 3:09 PM, Tim Nevels via 4D_Tech <4d_tech@lists.4d.com> wrote: > > I wonder whatever happened to the original 4D Compiler writer David Hemmo? > David’s at Apple now. > When he wrote 4D Compiler back in 1990 I thought he was a programming god... So di

Re: 4D Compiler

2017-04-06 Thread Kirk Brooks via 4D_Tech
Tim, That's probably an inflation-adjusted number. Which makes the first 128k Mac I bought in April of '84 the equivalent of about $6,700 now. Still not the most expensive computer I've personally bought - that was a Mac II with an 80mb drive and I don't remember how much RAM. 4MB of RAM back then

Re: 4D Compiler

2017-04-06 Thread Tim Nevels via 4D_Tech
> On Apr 6, 2017, at 7:52 PM, Lee Hinde wrote: > > On Apr 6, 2017, at 3:09 PM, Tim Nevels via 4D_Tech <4d_tech@lists.4d.com> > wrote: >> >> I wonder whatever happened to the original 4D Compiler writer David Hemmo? > > David’s at Apple now. I wonder what

Re: 4D Compiler

2017-04-07 Thread Nigel Greenlee via 4D_Tech
@lists.4d.com> wrote: > >> On Apr 6, 2017, at 7:52 PM, Lee Hinde wrote: >> >> On Apr 6, 2017, at 3:09 PM, Tim Nevels via 4D_Tech <4d_tech@lists.4d.com> >> wrote: >>> >>> I wonder whatever happened to the original 4D Compiler writer David Hemmo? &g

Re: 4D Compiler

2017-04-07 Thread Nigel Greenlee via 4D_Tech
Douglas. Yes that is kind of what i thought and can remember the old days so would kind of expect it to have failed after one of those passes and-when you have fixed of type x get more but that really was not what i saw-i had syntax errors( to many” }"or “)” etc) and variables re-declared diff

Re: 4D Compiler

2017-04-07 Thread Chip Scheide via 4D_Tech
Not copyable is not exactly true ;) On Thu, 06 Apr 2017 20:34:59 -0500, Tim Nevels via 4D_Tech wrote: > >>> When he wrote 4D Compiler back in 1990 I thought he was a >>> programming god... >> >> So did ACIUS, given the original pricing. > > I don’t rem

Re: 4D Compiler

2017-04-07 Thread Chip Scheide via 4D_Tech
anywhere you may use: - Execute Formula - other means of indirect code execution. Method(s), code stored in data for example On Fri, 07 Apr 2017 09:30:38 +0100, Nigel Greenlee via 4D_Tech wrote: > Can anyone think of other examples where a var might be used in a way > that does not show up in fo

RE: 4D Compiler

2017-04-07 Thread Timothy Penner via 4D_Tech
Nigel, > I tried David Adams suggestion of trying ‘all vars are declared’ and at 69000 > errors decided that was not the way to go! You really should try to fix those...That is 69,000 places that 4D is guessing what the variable type should be - instead of you explicitly telling 4D what the va

Re: 4D Compiler

2017-04-07 Thread Herr Alexander Heintz via 4D_Tech
This is where strict variable nomenclature with typing info helps a lot. You can easily create a method that can gather all locals in a piece of code, and add the declarations at the top of a method. You can even apply that automatically using METHOD GET CODE and METHOD SET CODE. OTOH if you have

RE: 4D Compiler

2017-04-07 Thread Timothy Penner via 4D_Tech
ariable at the top of that method then compile again then the 69,000 would be reduced by 100. So don't let the 69,000 errors scare you, it may be much less! The 4D compiler is trying to warn you about coding mistakes, it is better to fix those coding mistakes rather than ignore them. h

Re: 4D Compiler

2017-04-07 Thread Kirk Brooks via 4D_Tech
Nigel, I went through a similar process several years ago when I changed the compile settings on a rather extensive database to 'all variables are typed.' I forget the number but it was a lot. Daunting. I forget how much time I spent on it but it turned out to be much less than I thought it would

Re: 4D Compiler

2017-04-09 Thread Nigel Greenlee via 4D_Tech
Heinz, Timothy. I completely agree. A strict nomenclature with typing is essential. In fact its the only way i too have been able to implement auto declaration in my code-not just locals-i was inspired by your comment about doing it for locals on here a while back to go back and complete work