D3 Windows compiler

110 views
Skip to first unread message

CDMI - Steve T

unread,
Jun 19, 2017, 9:42:35 AM6/19/17
to Pick and MultiValue Databases
I am editing some D3/Windows code and am seeing 'lower-case' syntax in a few area. Most of the code is in upper case (which I am used to). When I compile with the (O option, the compiler refuses those lines in lower case.
Is there an option I should use with the compile when lower case syntax is involved?
thanks in advance,

Steve Trimble
Computerized Data Mgmt Inc (CDMI)

Kevin Powick

unread,
Jun 19, 2017, 1:01:11 PM6/19/17
to Pick and MultiValue Databases
Use COMPILE MyProgram (O  instead of BASIC MyProgram (O

You could also do what a lot of D3 users do, and copy the MD entry for COMPILE over BASIC, so that you can continue to use the shorter form of the verb, which you're probably used to anyway.

--
Kevin Powick

CDMI - Steve T

unread,
Jun 19, 2017, 1:36:57 PM6/19/17
to Pick and MultiValue Databases
ok thanks Kevin
I read up on the 'compile' verb in the D3 documentation:
The compile BASIC program invokes the BASIC compiler and translates the specified source code into executable object code with case-insensitivity.
then...
Case-insensitivity means that the variables TOTAL, Total, and total all represent the same symbol. A case-sensitive state would treat these as three separate variables.

was not very definitive, so I appreciate your feedback.
be well

Peter McMurray

unread,
Jun 19, 2017, 5:42:27 PM6/19/17
to Pick and MultiValue Databases
Hi Steve
The COMPILE prog (O) produces optimised runtime code from a text file written in the Pick Basic Language.
It does NOT interpret commands in the same manner in all circumstances so caution is required.
A change that caused me significant grief on switch over was ICONV where using the BASIC command trimmed leading spaces the COMPILE (O) does not.
Suddenly a program that had worked for at least 20 years unpacking a flat credit card file crashed spectacularly. The supplying company had chosen to to only use the trailing 8 characters of the credit card on a field of 16 spaces. The scream from the operator on the other side of the room as her screen sprayed up several thousand runtime errors was memorable.

210 **         SSCARD = ICONV(CSPANNUM[9,16],"MD0") works fine with the BASIC command not with COMPILE
211         SSCARD = TRIM(CSPANNUM[9,16])
212         SSCARD = ICONV(SSCARD,"MD0")

That will not be changed as the COMPILE version is technically more correct.
However a major error that was corrected many moons ago has crept back in in the latest 10... versions of D3. The COMPILE requires subroutine labels to be physically defined before they are called so
MainLine ** do major stuff
gosub 1000;* initialise
major routine
end
1000 *setup something
return
will crash. It is supposed to be fixed in the next patch. A special patch has been released for another hitch in the spooler so the current advice is use D3 9.4.2
.
I have used COMPILE (O) exclusively for the last 5 years typically by putting an O in attribute 6 which is the default in CCOMPILE that Compile calls. You can ignore the twaddle about it taking a long time with lots of levels. It goes like a rocket on Windows 10 with optimise only doing 1 level but that 1 is worth it.
I find the lower case to be extremely useful to show recent alterations as I switched to the Microsoft preferred variable style - totItems instead of TOTITEMS - some time back.

Steve Trimble

unread,
Jun 20, 2017, 5:16:49 PM6/20/17
to mvd...@googlegroups.com
thanks for your reply Peter. will keep this in mind.


Steve Trimble
Computerized Data Mgmt Inc
(501) 772-3450 cell / text

--
You received this message because you are subscribed to
the "Pick and MultiValue Databases" group.
To post, email to: mvd...@googlegroups.com
To unsubscribe, email to: mvdbms+unsubscribe@googlegroups.com
For more options, visit http://groups.google.com/group/mvdbms

Reply all
Reply to author
Forward
0 new messages