PDA

View Full Version : Errors Compiling our StreamV App under 19.1



FrankValcarcel
11-Jul-2018, 05:31 PM
Following command causes compiler to run out of macro space:


Procedure AddLine String s1 String s2 String s3 String s4 String s5 String s6 String s7 String s8 String s9 String sA ;
String sB String sC String sD String sE String sF String sG String sH String sI String sJ String sK ;
String sL String sM String sN String sO String sP String sQ String sR String sS String sT String sU ;
String sV String sW String sX String sY String sZ

-----------------------
Memory status commands no longer work, generate invalid literal


Type MEMORYSTATUS
Field MEMORYSTATUS.dwLength as DWord // sizeof(MEMORYSTATUS)
Field MEMORYSTATUS.dwMemoryLoad as DWord // percent Of memory in use
Field MEMORYSTATUS.dwTotalPhys as DWord // bytes Of physical memory
Field MEMORYSTATUS.dwAvailPhys as DWord // free physical memory bytes
Field MEMORYSTATUS.dwTotalPageFile as DWord // bytes Of paging file
Field MEMORYSTATUS.dwAvailPageFile as DWord // free bytes Of paging file
Field MEMORYSTATUS.dwTotalVirtual as DWord // user bytes Of address space
Field MEMORYSTATUS.dwAvailVirtual as DWord // free user bytes
End_Type // MEMORYSTATUS

-------------------------
SUBTOTAL in BasicRport Object generates a command not found error
-------------------------
WinReport not available (in doc I believe)
--------------------------
Summary: 320 errors, in 747,116 line PRN file.

starzen
12-Jul-2018, 02:11 AM
Following command causes compiler to run out of macro space:


Procedure AddLine String s1 String s2 String s3 String s4 String s5 String s6 String s7 String s8 String s9 String sA ;
String sB String sC String sD String sE String sF String sG String sH String sI String sJ String sK ;
String sL String sM String sN String sO String sP String sQ String sR String sS String sT String sU ;
String sV String sW String sX String sY String sZ

-----------------------
Memory status commands no longer work, generate invalid literal


Type MEMORYSTATUS
Field MEMORYSTATUS.dwLength as DWord // sizeof(MEMORYSTATUS)
Field MEMORYSTATUS.dwMemoryLoad as DWord // percent Of memory in use
Field MEMORYSTATUS.dwTotalPhys as DWord // bytes Of physical memory
Field MEMORYSTATUS.dwAvailPhys as DWord // free physical memory bytes
Field MEMORYSTATUS.dwTotalPageFile as DWord // bytes Of paging file
Field MEMORYSTATUS.dwAvailPageFile as DWord // free bytes Of paging file
Field MEMORYSTATUS.dwTotalVirtual as DWord // user bytes Of address space
Field MEMORYSTATUS.dwAvailVirtual as DWord // free user bytes
End_Type // MEMORYSTATUS

-------------------------
SUBTOTAL in BasicRport Object generates a command not found error
-------------------------
WinReport not available (in doc I believe)
--------------------------
Summary: 320 errors, in 747,116 line PRN file.

Frank

there must be more to it. Just adding your code to order entry in 19.1 doesnt cause any errors

i would compile with V99 and look at the prn file to see what happens. Maybe some duplicate definition or something like that

Vincent Oorsprong
12-Jul-2018, 02:26 AM
Frank,


Memory status commands no longer work, generate invalid literal
The GlobalMemoryStatus function has been superceded years and year ago with GlobalMemoryStatusEx. The "Ex" version uses a real struct vs the old a semi-struct. We want/need to get rid of the semi-structs so I feel it is good that you get a warning about this. Rewriting the code is adding "Ex" and maybe rewrite the way you get some of the data from the result variable.


SUBTOTAL in BasicRport Object generates a command not found error
AFAIK Alpha 3 added the subtotal back



Procedure AddLine String s1 String s2 String s3 String s4 String s5 String s6 String s7 String s8 String s9 String sA ;
String sB String sC String sD String sE String sF String sG String sH String sI String sJ String sK ;
String sL String sM String sN String sO String sP String sQ String sR String sS String sT String sU ;
String sV String sW String sX String sY String sZ
I would have not written the code this way but using Num_Arguments to handle the arguments dynamically

FrankValcarcel
12-Jul-2018, 08:04 AM
1. Where do I find doc on GlobalMemoryStatusEx, its not in the help. I get a hard compile error, not a warning.
2. re SUBTOTAL: I thought I was in Alpha 3, Ill check
3. Is there a limit to the number of arguements on a procedure call?


Frank,


The GlobalMemoryStatus function has been superceded years and year ago with GlobalMemoryStatusEx. The "Ex" version uses a real struct vs the old a semi-struct. We want/need to get rid of the semi-structs so I feel it is good that you get a warning about this. Rewriting the code is adding "Ex" and maybe rewrite the way you get some of the data from the result variable.


AFAIK Alpha 3 added the subtotal back


I would have not written the code this way but using Num_Arguments to handle the arguments dynamically

FrankValcarcel
12-Jul-2018, 08:05 AM
Thanks, I'll look.

Frank

there must be more to it. Just adding your code to order entry in 19.1 doesnt cause any errors

i would compile with V99 and look at the prn file to see what happens. Maybe some duplicate definition or something like that

Vincent Oorsprong
12-Jul-2018, 09:44 AM
Frank,


Where do I find doc on GlobalMemoryStatusEx, its not in the help. I get a hard compile error, not a warning
Where did you finf GlobalMemoryStatus? Both a Windows API functions defined in and for dfabout


Is there a limit to the number of arguements on a procedure call?
I believe the maximum is set by the maximum length of the compiler command line but in general I would say a method with more than 15 parameters is "unworkable". I've seen COM methods from Microsoft having over 30 arguments but it is "crazy".

Dennis Piccioni
12-Jul-2018, 10:33 AM
Frank, perhaps you can pass a struct instead.

Stephen W. Meeley
12-Jul-2018, 11:33 AM
Frank,

Did all of the items you are reporting compile without error in 19.0?

FrankValcarcel
12-Jul-2018, 12:42 PM
I copied GlobalMemoryStatus from your prior message.

FrankValcarcel
12-Jul-2018, 12:42 PM
I'll come up with a better way. It just grew by itself over the years.

FrankValcarcel
12-Jul-2018, 12:48 PM
Yes sir, we just installed Alpha3, converted the workspaces and compiled the current code. Surprisingly we did not get a whole slew of compiler warnings which we expected.

Stephen W. Meeley
12-Jul-2018, 12:55 PM
Frank,

Compiler warnings are suppressed when you migrate an existing project. You have to go to project properties and uncheck the suppress option.

FrankValcarcel
12-Jul-2018, 01:25 PM
Whoops, we compiled under A2. Installing A3 and trying again.

FrankValcarcel
12-Jul-2018, 02:54 PM
Compiling under A3.
2 List and label errors - names already used, probably name conflict with new DF code
Obsolete MEMORYSTATUS call - eliminated since it was used for CPM/TurboDOS
Procedure call does not like more than 35 arguments (not an issue as we modified the 2 calls that big)
Otherwise StreamV runs!
We have about 2 hours in it.
2630 warnings, but most ae dups in class

starzen
12-Jul-2018, 04:02 PM
wrong post

Garret Mott
12-Jul-2018, 04:03 PM
Frank - there's a post from Bob Worsley that goes into the L&L duplicate names.

Bob Worsley
12-Jul-2018, 06:56 PM
Or pass an array instead

Bob Worsley
12-Jul-2018, 06:58 PM
Hi Frank, the L&L question is answered here (https://support.dataaccess.com/Forums/showthread.php?62941-L-amp-L-and-19-1).

Vincent Oorsprong
13-Jul-2018, 02:58 AM
Frank,

That is what I thought too with the Microsoft COM methods with sooooo many parameters...