Dr A Olowofoyeku wrote:
Presumably these get fed through to the back-end c-preprocessor?
Presumably. I believe that this is one of those things that GPC inherits from GCC.
Yes (though it's not exaclty back-end, but rather a pre-front-end, but that's nitpicking). Since the GCC preprocessor already supports include files and ifdefs (which GPC needs for compatibility to BP and other compilers), it was easiest to just take it and allow the `{$foo}' syntax in addition to `#foo'.
And the additional features (mainly macros) are certainly not a disadvantge ;-). Most uses of macros in C are not necessary in Pascal where we have constants and inline functions(1), and also not recommended in GPC, but there are some situations where they come handy, like the one discussed here.
(1) Yes, modern C compilers have that, too ("enum" and GCC's inline), but C programmers seem reluctant to use them...
Are there any other obscure "features" like this in GPC that I might need to know about?
Many (e.g., I guess you could do something like 'Var x : integer (40)' to declare a 40-bit integer (if such a thing exists) - but I am not sure how it will be handled by the compiler).
That's right, though this feature doesn't come from GCC. (C doesn't have such a feature, except in "struct"s, which sometimes causes C programmers some headaches... ;-)
They are handled mostly like subranges (e.g. Integer (6) = -32 .. 31) and are most often used to get types with a guaranteed size on any system (e.g. for compatibility with other compilers, or binary file compatibility, or when the requirements demand a fixed size, e.g. MD5 values are always 128 bit), since the size of plain `Integer' etc. can vary from system to system.
I am not sure where they are all documented though. I obtain a lot of my information from the GPC source code.
Yes, the GPC documentation is lacking, that's perhaps the most urgent problem. However, the `Integer (40)' feature in particular is documented there under Reference/Integer.
Frank
Are there any other obscure "features" like this in GPC that I might need to know about?
Yes, the GPC documentation is lacking, that's perhaps the most urgent problem. However, the `Integer (40)' feature in particular is documented there under Reference/Integer.
Do you mean the info database? Or the source code?
Can anyone recommend a list of documentation apart from the info database (I know about this), to help me having to pester people on this list with "novice" questions.
I am trying to get myself "up to speed" with GPC and am finding it a bit problematic (I am a novice with GPC but not a novice programmer).
Mark.
-- Mark Taylor, Department of Corporate Information & Computing Services, Extension 21145. (0114) 222 1145 http://www.shef.ac.uk/misc/personal/ad1mt
The opinions expressed in this email are mine and not those of the University of Sheffield.
On 10 Mar 00, at 10:22, Mark Taylor wrote:
Are there any other obscure "features" like this in GPC that I might need to know about?
Yes, the GPC documentation is lacking, that's perhaps the most urgent problem. However, the `Integer (40)' feature in particular is documented there under Reference/Integer.
Do you mean the info database? Or the source code?
I think he means the info database.
Can anyone recommend a list of documentation apart from the info database (I know about this), to help me having to pester people on this list with "novice" questions.
I am trying to get myself "up to speed" with GPC and am finding it a bit problematic (I am a novice with GPC but not a novice programmer).
Like Frank said, up-to-date documentation on GPC is currently a major issue. Until one is produced, it seems that you have to find any information you want from a variety of sources. This mailing list and its archives is a good place to look. I have also found the stuff in Frank's 'to do' pages (http://fjf.gnu.de/gpc-todo_toc.html) to be informative. Then the source code (especially the sources in the 'units' directory). Finally, and perhaps this is what you should do first: you can go to the directory containing 'gpc1.exe', and type 'gpc1 --help'. This should give you some interesting information on compiler/linker switches, etc.
Best regards, The Chief ----- Dr Abimbola A Olowofoyeku (The African Chief) Email: African_Chief@bigfoot.com Author of Chief's Installer Pro v5.22 for Win32 http://www.bigfoot.com/~African_Chief/chief32.htm
On 10 Mar 2000, at 10:22, Mark Taylor wrote:
Can anyone recommend a list of documentation apart from the info database (I know about this), to help me having to pester people on this list with "novice" questions.
I find the GPC documentation to be a lot easier to read when it is presented in book form (e.g., the Postscript version), rather than in the info format. Hyperlinked documentation is great if you're using it as a reference source, i.e., looking for something specific. But the linear publication format is much more suited to reading from cover-to-cover to understand GPC's capabilities.
However, under NT, neither the Postscript version nor the info version is particularly easy to use. So I make PDF and WinHelp versions for my own use. The MikTex package, available at:
is very easy to install and will produce PDF and WinHelp versions directly from the GPC texinfo files that accompany the GPC source distribution. PDF particularly allows me to read it on the screen, print pages as desired, and globally search the documentation text. Highly recommended!
-- Dave Bryan
J. David Bryan wrote:
Looked at it; it claims to be "free" software. Is it really? Anybody knows its license?
Anyway, a free, portable PDFTeX also exists.
Peter
On 11 Mar 2000, at 9:35, Peter Gerwinski wrote:
Looked at it; it claims to be "free" software. Is it really? Anybody knows its license?
I've browsed quickly through the documentation that comes with MiKTeX, and I cannot find a license statement. The source to the program is available at:
(US) ftp://ctan.tug.org/tex-archive/systems/win32/miktex/source/
or
(DE) ftp://ftp.dante.de/tex-archive/systems/win32/miktex/source/
...so if you have a fast Internet connection, you could see if the license is in the source (I have a slow connection :-).
Anyway, a free, portable PDFTeX also exists.
A Win32 port of PDFTeX is included in MiKTeX.
-- Dave
J. David Bryan wrote:
Looked at it; it claims to be "free" software. Is it really? Anybody knows its license?
I've browsed quickly through the documentation that comes with MiKTeX, and I cannot find a license statement. The source to the program is available at:
(US) ftp://ctan.tug.org/tex-archive/systems/win32/miktex/source/
or
(DE) ftp://ftp.dante.de/tex-archive/systems/win32/miktex/source/
It looks like GPL. :-)
Thanks,
Peter
"J. David Bryan" a écrit :
However, under NT, neither the Postscript version nor the info version is particularly easy to use. So I make PDF and WinHelp versions for my own use. The MikTex package, available at:
is very easy to install and will produce PDF and WinHelp versions directly from the GPC texinfo files that accompany the GPC source distribution. PDF particularly allows me to read it on the screen, print pages as desired, and globally search the documentation text.
I use miktex. It works to produce pdf, but I have no hyperlinks (especially from index to actual page). Am I missing something ? I compile (in a W98 dos box into the p/doc directory) with texi2dvi -p gpc.texi. How do you produce WinHelp version ?
Maurice
On 11 Mar 2000, at 14:09, Maurice Lombardi wrote:
I use miktex. It works to produce pdf, but I have no hyperlinks (especially from index to actual page). Am I missing something ?
Yes, there is a "texinfo.tex" present in the p/doc directory that interferes with the PDF process. Remove this file and re-run.
However, there is another problem. The GPC documentation has some incompatibility with the "texinfo.tex" that is part of the PDFTeX distribution. When you run, you will get errors such as:
! Undefined control sequence. @unnumberedsubseczzz #1->@seccheck {unnumberedsubsec}@plainsubsechead... @unnmhead ...@or @unnumberedsubseczzz {#2} @or @unnumberedsubsubseczz... l.334 @unnumberedsubsec Syntax
You can enter "q" to ignore the errors and continue quietly, but you will then have to run "texi2dvi -p gpc.texi" again to resolve the references and to get hyperlinks in the body, table of contents, and index.
Peter: I don't know anything about texinfo, but perhaps the GPC documentation is relying on a custom texinfo.tex file. That will work for TeX but not for PDFTeX. Can this be changed so that it does not rely on a custom file?
And there is a third problem (maybe). If you are processing the files in the GPC source tree, you are not getting the proper "gpcpas.texi" file. The proper version of this file is created during the GPC build process. You must build GPC before building the documentation to get the up-to-date file.
Peter: it might be more helpful if the current "gpcpas.texi" file was included in the source, so that those needing the documentation but *not* wanting or needing to build the compiler could use this file directly from the distribution. Would this be possible?
How do you produce WinHelp version ?
"makertf --force --hpj gpc.hpj -o gpc.rtf gpc.texi". This produces "gpc.rtf" (the WinHelp source file) and "gpc.hpj" (the WinHelp job file). These file must then be processed with the WinHelp compiler to produce "gpc.hlp".
The WinHelp compiler is available at:
ftp://ftp.microsoft.com/softlib/mslfiles/HCWSETUP.EXE
-- Dave Bryan
I find the GPC documentation to be a lot easier to read when it is presented in book form (e.g., the Postscript version), rather than in the info format. Hyperlinked documentation is great if you're using it as a reference source, i.e., looking for something specific. But the linear publication format is much more suited to reading from cover-to-cover to understand GPC's capabilities.
Why did the GPC team choose for info instead of Tex? What are the advantages over Tex? (One could have obtained info with tex2info anyway?)
Marco van de Voort (MarcoV@Stack.nl) http://www.stack.nl/~marcov/xtdlib.htm
Marco van de Voort wrote:
Why did the GPC team choose for info instead of Tex? What are the advantages over Tex? (One could have obtained info with tex2info anyway?)
That's the standard chosen for the GNU project. (I myself would prefer (La)TeX, too.)
From GNU Texinfo you can produce online documentation as well as
printed manuals from the same source tree. Meanwhile several such documentation languages exist, but GNU Texinfo was among the first ones.
One could consider moving to DocBook (SGML) which can produce GNU Texinfo (and TeX and HTML and whatever).
Opinions?
Peter
On 11 Mar 2000, at 14:30, Marco van de Voort wrote:
Why did the GPC team choose for info instead of Tex? What are the advantages over Tex?
As others have mentioned, the FSF encourages (requires?) documentation in "texinfo" format. This hybrid allows one to use TeX to produce printed documents (or PDFs) or GNU Info to produce "help files." It's a tidy solution, because both are produced from the same sources.
On 11 Mar 2000, at 15:43, Peter Gerwinski wrote:
One could consider moving to DocBook (SGML) which can produce GNU Texinfo (and TeX and HTML and whatever).
Opinions?
Not unless you're proposing to supply an *additional* file format (i.e., in addition to texinfo files). All of the other GNU documentation is in texinfo format, and I'd prefer not to have to install a separate tool just to handle the GPC files.
As a philosophical note, it appears to me that documentation should be supplied in two basic formats: one suitable for printing, and one suitable for on-line viewing, the latter hyperlinked for easy navigation. Texinfo does just that with a single source format; it offers TeX for printed output and info for viewing. Any substitute must offer these two general output formats, I believe, for maximum utility.
I actually don't use TeX for printing but rather as an intermediate step to PDF. I print from the PDFs (because I don't have a Postscript printer), plus I can view them if I want. PDFTeX hyperlinks the PDF, which is an added bonus.
Nor do I use the info files at all. Instead, I make Windows WinHelp files; this is the "native" hyperlinked viewing format for NT. HTML or any other hyperlinked format would be acceptable too.
I personally find the texinfo file format to be arcane, but it serves the goal of producing printed and viewable material from the same sources.
-- Dave Bryan
11-Mar-00 14:30 you wrote:
I find the GPC documentation to be a lot easier to read when it is presented in book form (e.g., the Postscript version), rather than in the info format. Hyperlinked documentation is great if you're using it as a reference source, i.e., looking for something specific. But the linear publication format is much more suited to reading from cover-to-cover to understand GPC's capabilities.
MV> Why did the GPC team choose for info instead of Tex?
What do you mean by "TeX" ??? TeX is just typesetting machine, you know. You need macropackage to use it effectively.
MV> What are the advantages over Tex?
What's advantage of Ford over car ?
MV> (One could have obtained info with tex2info anyway?)
Hmm. What's tex2info and what it supposed to do ???
MV> Why did the GPC team choose for info instead of Tex?
What do you mean by "TeX" ??? TeX is just typesetting machine, you know. You need macropackage to use it effectively.
I call 'pascal' 'pascal', not RTS because I need an rtl/rts to use it effectively: -)
MV> What are the advantages over Tex?
What's advantage of Ford over car ?
Don't get your point.
MV> (One could have obtained info with tex2info anyway?)
Hmm. What's tex2info and what it supposed to do ???
Convert (la)Tex 2 info ? Marco van de Voort (MarcoV@Stack.nl) http://www.stack.nl/~marcov/xtdlib.htm
11-Mar-00 19:41 you wrote:
MV> Why did the GPC team choose for info instead of Tex?
What do you mean by "TeX" ??? TeX is just typesetting machine, you know. You need macropackage to use it effectively.
I call 'pascal' 'pascal', not RTS because I need an rtl/rts to use it effectively: -)
Yes, but when you are asking about "advantages of RTS over pascal" then theanswer is "what do you mean afetr all" ? You are asked effectively the same question....
MV> What are the advantages over Tex?
What's advantage of Ford over car ?
Don't get your point.
Exactly. TEXINFO is ALSO dialect of TeX (you can use other tools to print itbut it's other story). So to ask why you are using info and not TeX is just stupid: when you are using info you ARE using TeX.
MV> (One could have obtained info with tex2info anyway?)
Hmm. What's tex2info and what it supposed to do ???
Convert (la)Tex 2 info ?
Hmm. Perhaps. 1) Where I can find such beast and 2) What about crossreferences, search and so so ?