+ Merged from fixbranch
Before Width: | Height: | Size: 128 B |
1
docs/buttons/ch_beg_r.png
Normal file
@ -0,0 +1 @@
|
||||
‰PNG
|
Before Width: | Height: | Size: 133 B |
1
docs/buttons/ch_begin.png
Normal file
@ -0,0 +1 @@
|
||||
‰PNG
|
Before Width: | Height: | Size: 257 B |
1
docs/buttons/ch_del_r.png
Normal file
@ -0,0 +1 @@
|
||||
‰PNG
|
Before Width: | Height: | Size: 257 B |
1
docs/buttons/ch_delet.png
Normal file
@ -0,0 +1 @@
|
||||
‰PNG
|
Before Width: | Height: | Size: 135 B |
1
docs/buttons/ch_end.png
Normal file
@ -0,0 +1 @@
|
||||
‰PNG
|
Before Width: | Height: | Size: 127 B |
1
docs/buttons/ch_end_r.png
Normal file
@ -0,0 +1 @@
|
||||
‰PNG
|
Before Width: | Height: | Size: 133 B |
Before Width: | Height: | Size: 257 B |
Before Width: | Height: | Size: 135 B |
Before Width: | Height: | Size: 225 B |
1
docs/buttons/contents.png
Normal file
@ -0,0 +1 @@
|
||||
‰PNG
|
Before Width: | Height: | Size: 225 B |
Before Width: | Height: | Size: 78 B |
Before Width: | Height: | Size: 78 B |
1
docs/buttons/crossref.png
Normal file
@ -0,0 +1 @@
|
||||
‰PNG
|
Before Width: | Height: | Size: 87 B |
Before Width: | Height: | Size: 87 B |
1
docs/buttons/footnote.png
Normal file
@ -0,0 +1 @@
|
||||
‰PNG
|
Before Width: | Height: | Size: 195 B |
1
docs/buttons/image.png
Normal file
@ -0,0 +1 @@
|
||||
‰PNG
|
Before Width: | Height: | Size: 180 B |
1
docs/buttons/index.png
Normal file
@ -0,0 +1 @@
|
||||
‰PNG
|
Before Width: | Height: | Size: 180 B |
Before Width: | Height: | Size: 172 B |
1
docs/buttons/next.png
Normal file
@ -0,0 +1 @@
|
||||
‰PNG
|
Before Width: | Height: | Size: 172 B |
1
docs/buttons/next_g.png
Normal file
@ -0,0 +1 @@
|
||||
‰PNG
|
Before Width: | Height: | Size: 259 B |
Before Width: | Height: | Size: 259 B |
Before Width: | Height: | Size: 172 B |
Before Width: | Height: | Size: 172 B |
Before Width: | Height: | Size: 259 B |
1
docs/buttons/nx_grp.png
Normal file
@ -0,0 +1 @@
|
||||
‰PNG
|
Before Width: | Height: | Size: 259 B |
1
docs/buttons/nx_grp_g.png
Normal file
@ -0,0 +1 @@
|
||||
‰PNG
|
Before Width: | Height: | Size: 220 B |
1
docs/buttons/prev.png
Normal file
@ -0,0 +1 @@
|
||||
‰PNG
|
Before Width: | Height: | Size: 220 B |
1
docs/buttons/prev_g.png
Normal file
@ -0,0 +1 @@
|
||||
‰PNG
|
Before Width: | Height: | Size: 303 B |
Before Width: | Height: | Size: 303 B |
Before Width: | Height: | Size: 220 B |
Before Width: | Height: | Size: 220 B |
Before Width: | Height: | Size: 303 B |
1
docs/buttons/pv_grp.png
Normal file
@ -0,0 +1 @@
|
||||
‰PNG
|
Before Width: | Height: | Size: 303 B |
1
docs/buttons/pv_grp_g.png
Normal file
@ -0,0 +1 @@
|
||||
‰PNG
|
Before Width: | Height: | Size: 209 B |
Before Width: | Height: | Size: 145 B |
1
docs/buttons/up.png
Normal file
@ -0,0 +1 @@
|
||||
‰PNG
|
Before Width: | Height: | Size: 145 B |
1
docs/buttons/up_g.png
Normal file
@ -0,0 +1 @@
|
||||
‰PNG
|
Before Width: | Height: | Size: 145 B |
Before Width: | Height: | Size: 145 B |
@ -1,5 +1,6 @@
|
||||
%
|
||||
% $Id$
|
||||
%
|
||||
% This file is part of the FPC documentation.
|
||||
% Copyright (C) 1997, by Michael Van Canneyt
|
||||
%
|
||||
@ -19,11 +20,8 @@
|
||||
% Boston, MA 02111-1307, USA.
|
||||
|
||||
\usepackage{ifthen}
|
||||
|
||||
%
|
||||
% Html navigation search button
|
||||
%
|
||||
\htmladdtonavigation{\htmladdnormallink{\htmladdimg{../buttons/search.gif}}{javascript:opensearch()}}
|
||||
\usepackage{xspace}
|
||||
\usepackage{multicol}
|
||||
|
||||
%
|
||||
% FPC environments
|
||||
@ -35,6 +33,11 @@
|
||||
% The same, but with label in third argument (tab:#3)
|
||||
\newenvironment{FPCltable}[3]{\begin{table}\caption{#2}\label{tab:#3}\begin{center}\begin{tabular}{#1}}{\end{tabular}\end{center}\end{table}}
|
||||
|
||||
%
|
||||
% Picture including with breaks before and after
|
||||
%
|
||||
\newcommand{\fpcaddimg}[1]{\htmlclear\htmlclear\htmladdimg{#1}\htmlclear\htmlclear}
|
||||
|
||||
%
|
||||
% Html Refs
|
||||
%
|
||||
@ -123,8 +126,7 @@
|
||||
%
|
||||
% Some versions
|
||||
%
|
||||
\newcommand{\fpcversion}{1.00.0}
|
||||
|
||||
\newcommand{\fpcversion}{1.0.4}
|
||||
%
|
||||
% PDF support
|
||||
%
|
||||
@ -137,7 +139,6 @@
|
||||
\pdftrue
|
||||
\fi
|
||||
}
|
||||
|
||||
%
|
||||
% end of fpc-html.tex
|
||||
%
|
||||
|
31
docs/fpc.sty
@ -95,12 +95,13 @@
|
||||
%
|
||||
\newenvironment{remark}{\par\makebox[0pt][r]{\bfseries{}Remark:\hspace{.25em}}}{\par}
|
||||
% For Tables.
|
||||
\newenvironment{FPCtable}[2]{\begin{table}\caption{#2}\begin{center}\begin{tabular}{#1}}{\end{tabular}\end{center}\end{table}}
|
||||
\newenvironment{FPCtable}[2]{\begin{table}[ht]\caption{#2}\begin{center}\begin{tabular}{#1}}{\end{tabular}\end{center}\end{table}}
|
||||
% The same, but with label in third argument (tab:#3)
|
||||
\newenvironment{FPCltable}[3]{\begin{table}\caption{#2}\label{tab:#3}\begin{center}\begin{tabular}{#1}}{\end{tabular}\end{center}\end{table}}
|
||||
\newenvironment{FPCltable}[3]{\begin{table}[ht]\caption{#2}\label{tab:#3}\begin{center}\begin{tabular}{#1}}{\end{tabular}\end{center}\end{table}}
|
||||
%
|
||||
% Refs
|
||||
%
|
||||
\newcommand{\seefig}[1]{figure (\ref{fig:#1})\xspace}
|
||||
\newcommand{\seefl}[2]{\textsf{#1} (\pageref{fu:#2})}
|
||||
\newcommand{\seepl}[2]{\textsf{#1} (\pageref{pro:#2})}
|
||||
\newcommand{\seetypel}[2]{\textsf{#1} (\pageref{ty:#2})}
|
||||
@ -108,13 +109,15 @@
|
||||
\newcommand{\seevarl}[2]{\textsf{#1} (\pageref{var:#2})}
|
||||
\newcommand{\seec}[1]{chapter \ref{ch:#1}, page \pageref{ch:#1}\xspace}
|
||||
\newcommand{\sees}[1]{section \ref{se:#1}, page \pageref{se:#1}\xspace}
|
||||
\newcommand{\seeo}[1]{See \ref{option:#1}\xspace}
|
||||
\newcommand{\seeo}[1]{\var{-#1}, (see page \ref{option:#1})\xspace}
|
||||
\newcommand{\seet}[1]{table (\ref{tab:#1})\xspace}
|
||||
%
|
||||
% Function/procedure environments
|
||||
%
|
||||
\newenvironment{functionl}[2]{\subsection{#1}\index{#1}\label{fu:#2}\begin{FPCList}}{\end{FPCList}}
|
||||
\newenvironment{procedurel}[2]{\subsection{#1}\index{#1}\label{pro:#2}\begin{FPCList}}{\end{FPCList}}
|
||||
\newenvironment{method}[2]{\subsection{#1}\index{#1}\label{#2}\begin{FPCList}}{\end{FPCList}}
|
||||
\newenvironment{property}[2]{\subsection{#1}\index{#1}\label{#2}\begin{FPCList}}{\end{FPCList}}
|
||||
\newenvironment{function}[1]{\begin{functionl}{#1}{#1}}{\end{functionl}}
|
||||
\newenvironment{procedure}[1]{\begin{procedurel}{#1}{#1}}{\end{procedurel}}
|
||||
\newenvironment{typel}[2]{\subsection{#1}\index{#1}\label{ty:#2}\begin{FPCList}}{\end{FPCList}}
|
||||
@ -126,6 +129,9 @@
|
||||
\newcommand{\Declaration}{\item[Declaration]\ttfamily}
|
||||
\newcommand{\Description}{\item[Description]\rmfamily}
|
||||
\newcommand{\Errors}{\item[Errors]\rmfamily}
|
||||
\newcommand{\Visibility}{\item[Visibility]\ttfamily}
|
||||
\newcommand{\Synopsis}{\item[Synopsis]\rmfamily}
|
||||
\newcommand{\Arguments}{\item[Arguments]\rmfamily}
|
||||
\newcommand{\SeeAlso}{\item[See also]\rmfamily}
|
||||
%
|
||||
% Ref without labels
|
||||
@ -144,12 +150,14 @@
|
||||
%
|
||||
\newcommand{\var}[1]{\texttt {#1}}
|
||||
\newcommand{\file}[1]{\textsf {#1}}
|
||||
\newcommand{\key}[1]{\textsc{#1}}
|
||||
\newcommand{\menu}[1]{\textbf{"#1"}}
|
||||
%
|
||||
% Useful references.
|
||||
%
|
||||
\newcommand{\progref}{\htmladdnormallink{Programmers' guide}{../prog/prog.html}\xspace}
|
||||
\newcommand{\progref}{\htmladdnormallink{Programmers guide}{../prog/prog.html}\xspace}
|
||||
\newcommand{\refref}{\htmladdnormallink{Reference guide}{../ref/ref.html}\xspace}
|
||||
\newcommand{\userref}{\htmladdnormallink{Users' guide}{../user/user.html}\xspace}
|
||||
\newcommand{\userref}{\htmladdnormallink{Users guide}{../user/user.html}\xspace}
|
||||
\newcommand{\unitsref}{\htmladdnormallink{Unit reference}{../units/units.html}\xspace}
|
||||
\newcommand{\seecrt}{\htmladdnormallink{CRT}{../crt/crt.html}\xspace}
|
||||
\newcommand{\seelinux}{\htmladdnormallink{Linux}{../linux/linux.html}\xspace}
|
||||
@ -172,7 +180,7 @@
|
||||
\newcommand{\dos} {\textsc{dos}\xspace}
|
||||
\newcommand{\msdos}{\textsc{ms-dos}\xspace}
|
||||
\newcommand{\ostwo}{\textsc{os/2}\xspace}
|
||||
\newcommand{\windows}{\textsc{Windows 32-bit}\xspace}
|
||||
\newcommand{\windows}{\textsc{Windows}\xspace}
|
||||
\newcommand{\windowsnt}{\textsc{Windows NT}\xspace}
|
||||
\newcommand{\fpc}{Free Pascal\xspace}
|
||||
\newcommand{\gnu}{\textsc{gnu}\xspace}
|
||||
@ -200,16 +208,21 @@
|
||||
% PDF stuff
|
||||
%
|
||||
\ifpdf
|
||||
\usepackage[pdftex,bookmarks=true]{hyperref}
|
||||
\usepackage[pdftex,bookmarks=true,colorlinks=true,linkcolor=blue]{hyperref}
|
||||
\usepackage{times}
|
||||
\usepackage[T1]{fontenc}
|
||||
\setcounter{secnumdepth}{1}
|
||||
\pdfcompresslevel=9
|
||||
\pdfpagewidth=210mm
|
||||
\pdfpageheight=297mm
|
||||
\else
|
||||
\usepackage[dvips,bookmarks=true,colorlinks=true,linkcolor=blue]{hyperref}
|
||||
\fi
|
||||
\usepackage{html}
|
||||
\usepackage{htmllist}
|
||||
%
|
||||
% Fake Latex2Html support, so latex2html is not required
|
||||
%
|
||||
\RequirePackage{fakehtml}
|
||||
%
|
||||
%
|
||||
% For examples
|
||||
%
|
||||
|
@ -1,40 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>Free Pascal Manuals: Search Help</TITLE>
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="#C0C0C0">
|
||||
<H1>Searching in the Free Pascal manual pages</H1>
|
||||
|
||||
Searching in the manuals needs two steps :
|
||||
<OL>
|
||||
<LI>
|
||||
To search for words, type the words you want to search for in the
|
||||
top edit box. You can separate words with <TT>and</TT>, <TT>or</TT>
|
||||
and <TT>not</TT>. After you typed the words, press the <TT>Search</TT>
|
||||
button.
|
||||
|
||||
For example, you could type the following:
|
||||
<PRE>
|
||||
reset or assign
|
||||
</PRE>
|
||||
This would then look for pages that have 'assign' or 'reset' in them.
|
||||
After pressing the <TT>SEARCH</TT> button, the output would look
|
||||
something like
|
||||
<IMG SRC="help1.gif">
|
||||
<P>
|
||||
When you press the <TT>SEARCH</TT> button, the 'hit total' will be displayed.
|
||||
This is the number of times your combination of words was found.
|
||||
<P>
|
||||
It is possible that no words are found, in that case the hit total will be zero,
|
||||
and there will be a line 'No records found' in the listbox, as shown below:
|
||||
<IMG SRC="help2.gif">
|
||||
<LI> When the search is complete, the lower listbox contains a list of section titles.
|
||||
You can select one of these titles, and press the <TT>GO</TT> button. A new browser
|
||||
window will open, showing the page that contains the help you requested.
|
||||
You can repeat this as many times as you want.
|
||||
</OL>
|
||||
<HR>
|
||||
<A HREf="search.html">Back</A> to search page.
|
||||
<HR>
|
||||
</BODY>
|
||||
</HTML>
|
BIN
docs/help1.gif
Before Width: | Height: | Size: 1.1 KiB |
BIN
docs/help2.gif
Before Width: | Height: | Size: 1.1 KiB |
3540
docs/ide.tex
@ -22,6 +22,7 @@
|
||||
%
|
||||
% Preamble
|
||||
%
|
||||
\usepackage{tabularx}
|
||||
\ifx\pdfoutput\undefined
|
||||
\usepackage{html}
|
||||
\usepackage{htmllist}
|
||||
@ -56,6 +57,7 @@
|
||||
%\input{gpm.tex}
|
||||
%\input{graph.tex}
|
||||
%\input{heaptrc.tex}
|
||||
\input{ide.tex}
|
||||
%\input{ipc.tex}
|
||||
%\input{ide.tex}
|
||||
%\input{linux.tex}
|
||||
@ -68,5 +70,6 @@
|
||||
%\input{strings.tex}
|
||||
%\input{sysutils.tex}
|
||||
%\input{makefile.tex}
|
||||
\input{classes.tex}
|
||||
%\input{classes.tex}
|
||||
%\input{excepti.tex}
|
||||
\end{document}
|
||||
|
653
docs/prog.tex
43
docs/ref.tex
@ -1392,7 +1392,7 @@ begin
|
||||
WriteLn (x);
|
||||
end;
|
||||
...
|
||||
P := @printit;
|
||||
Proc := @printit;
|
||||
Func := @Pi;
|
||||
\end{verbatim}
|
||||
From this example, the difference with Turbo Pascal is clear: In Turbo
|
||||
@ -1411,7 +1411,7 @@ begin
|
||||
WriteLn (x);
|
||||
end;
|
||||
begin
|
||||
P := @printit;
|
||||
Proc := @printit;
|
||||
end.
|
||||
\end{verbatim}
|
||||
Because the \var{TOneArgCcall} type is a procedure that uses the cdecl
|
||||
@ -1758,7 +1758,7 @@ then a run-time error will occur. (run-time error 211, to be precise)
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Visibility
|
||||
\section{Visibility}
|
||||
For objects, only 2 visibility specifiers exist : \var{private} and
|
||||
For objects, 3 visibility specifiers exist : \var{private}, \var{protected} and
|
||||
\var{public}. If you don't specify a visibility specifier, \var{public}
|
||||
is assumed.
|
||||
Both methods and fields can be hidden from a programmer by putting them
|
||||
@ -1769,6 +1769,9 @@ can only be accessed in the module (i.e. unit or program) that contains
|
||||
the object definition.
|
||||
They can be accessed from inside the object's methods or from outside them
|
||||
e.g. from other objects' methods, or global functions.
|
||||
\item [Protected\ ] Is the same as \var{Private}, except that the members of
|
||||
a \var{Protected} section are also accessible to descendent types, even if
|
||||
they are implemented in other modules.
|
||||
\item [Public\ ] sections are always accessible, from everywhere.
|
||||
Fields and metods in a \var{public} section behave as though they were part
|
||||
of an ordinary \var{record} type.
|
||||
@ -2203,7 +2206,6 @@ Operator & Precedence & Category \\ \hline
|
||||
\end{FPCltable}
|
||||
When determining the precedence, the compiler uses the following rules:
|
||||
\begin{enumerate}
|
||||
\item Operators with equal precedence are executed from left to right.
|
||||
\item In operations with unequal precedences the operands belong to the
|
||||
operater with the highest precedence. For example, in \var{5*3+7}, the
|
||||
multiplication is higher in precedence than the addition, so it is
|
||||
@ -2212,6 +2214,25 @@ executed first. The result would be 22.
|
||||
first. Thus, \var {5*(3+7)} would result in 50.
|
||||
\end{enumerate}
|
||||
|
||||
\begin{remark}
|
||||
The order in which expressions of the same precedence are evaluated is not
|
||||
guaranteed to be left-to-right. In general, no assumptions on which expression
|
||||
is evaluated first should be made in such a case.
|
||||
The compiler will decide which expression to evaluate first based on
|
||||
optimization rules. Thus, in the following expression:
|
||||
\begin{verbatim}
|
||||
a := g(3) + f(2);
|
||||
\end{verbatim}
|
||||
\var{f(2)} may be executed before \var{g(3)}. This behaviour is distinctly
|
||||
different from \delphi or \tp.
|
||||
|
||||
If one expression {\em must} be executed before the other, it is necessary
|
||||
to split up the statement using temporary results:
|
||||
\begin{verbatim}
|
||||
e1 := g(3);
|
||||
a := e1 + f(2);
|
||||
\end{verbatim}
|
||||
\end{remark}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Expression syntax
|
||||
@ -3583,11 +3604,20 @@ The parameter list for a comparision operator or an arithmetic operator
|
||||
must always contain 2 parameters. The result type of the comparision
|
||||
operator must be \var{Boolean}.
|
||||
|
||||
\begin{remark}
|
||||
When compiling in \var{Delphi} mode or \var{Objfpc} mode, the result
|
||||
identifier may be dropped. The result can then be accessed through
|
||||
the standard \var{Result} symbol.
|
||||
|
||||
If the result identifier is dropped and the compiler is not in one
|
||||
of these modes, a syntax error will occur.
|
||||
\end{remark}
|
||||
|
||||
The statement block contains the necessary statements to determine the
|
||||
result of the operation. It can contain arbitrary large pieces of code;
|
||||
it is executed whenever the operation is encountered in some expression.
|
||||
The result of the statement block must always be defined; error conditions
|
||||
are not checked bythe compiler, and the code must take care of all possible
|
||||
are not checked by the compiler, and the code must take care of all possible
|
||||
cases, throwing a run-time error if some error condition is encountered.
|
||||
|
||||
In the following, the three types of operator definitions will be examined.
|
||||
@ -7269,7 +7299,6 @@ function are the values stored in the tables.
|
||||
\Errors
|
||||
None.
|
||||
\SeeAlso
|
||||
\seep{SetResourceStrings},
|
||||
\seef{GetResourceStringCurrentValue},
|
||||
\seef{GetResourceStringDefaultValue},
|
||||
\seef{GetResourceStringHash},
|
||||
@ -7304,4 +7333,4 @@ table \var{TableIndex} with index \var{StringIndex}.
|
||||
% The index.
|
||||
%
|
||||
\printindex
|
||||
\end{document}
|
||||
\end{document}
|
||||
|
@ -19,11 +19,12 @@
|
||||
% Boston, MA 02111-1307, USA.
|
||||
%
|
||||
\chapter{The SYSUTILS unit.}
|
||||
\FPCexampledir{sysutex}
|
||||
|
||||
This chapter describes the \file{sysutils} unit. The \var{sysutils} unit
|
||||
was largely written by Gertjan Schouten, and completed by michael Van Canneyt.
|
||||
It aims to be compatible to the Delphi sysutils unit, but in contrast with
|
||||
the latter, it is designed to work on multiple platforms. It is implemented
|
||||
This chapter describes the \file{sysutils} unit. The \file{sysutils} unit
|
||||
was largely written by Gertjan Schouten, and completed by Michael Van Canneyt.
|
||||
It aims to be compatible to the Delphi \file{sysutils} unit, but in contrast
|
||||
with the latter, it is designed to work on multiple platforms. It is implemented
|
||||
on all supported platforms.
|
||||
|
||||
This chapter starts out with a definition of all types and constants
|
||||
@ -31,6 +32,27 @@ that are defined, followed by an overview of functions grouped by
|
||||
functionality, and lastly the complete explanation of each function.
|
||||
|
||||
\section{Constants and types}
|
||||
The following general-purpose types are defined:
|
||||
\begin{verbatim}
|
||||
tfilename = string;
|
||||
|
||||
tsyscharset = set of char;
|
||||
tintegerset = set of 0..sizeof(integer)*8-1;
|
||||
|
||||
longrec = packed record
|
||||
lo,hi : word;
|
||||
end;
|
||||
|
||||
wordrec = packed record
|
||||
lo,hi : byte;
|
||||
end;
|
||||
|
||||
TMethod = packed record
|
||||
Code, Data: Pointer;
|
||||
end;
|
||||
\end{verbatim}
|
||||
The use and meaning of these types should be clear, so no extra information
|
||||
will be provided here.
|
||||
|
||||
The following general-purpose constants are defined:
|
||||
\begin{verbatim}
|
||||
@ -228,6 +250,7 @@ Functions for handling strings.
|
||||
\funcref{CompareText}{Compare two strings case insensitive}
|
||||
\procrefl{DisposeStr}{DisposeStrSys}{Remove string from heap}
|
||||
\funcref{IsValidIdent}{Is string a valid pascal identifier}
|
||||
\funcref{LastDelimiter}{Last occurance of character in a string}
|
||||
\funcref{LeftStr}{Get first N characters of a string}
|
||||
\funcref{LoadStr}{Load string from resources}
|
||||
\funcref{LowerCase}{Convert string to all-lowercase}
|
||||
@ -417,8 +440,8 @@ None.
|
||||
\seef{Time},\seef{Now}, \seetype{TDateTime}.
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex1.pp}}
|
||||
\html{\input{sysutex/ex1.tex}}
|
||||
\FPCexample{ex1}
|
||||
|
||||
|
||||
\begin{function}{DateTimeToFileDate}
|
||||
\Declaration
|
||||
@ -434,8 +457,8 @@ None.
|
||||
\seep{DateTimeToSystemTime}, \seef{DateTimeToTimeStamp}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex2.pp}}
|
||||
\html{\input{sysutex/ex2.tex}}
|
||||
\FPCexample{ex2}
|
||||
|
||||
|
||||
\begin{function}{DateTimeToStr}
|
||||
\Declaration
|
||||
@ -451,8 +474,8 @@ None.
|
||||
\seef{FormatDateTime}, \seetype{TDateTime}.
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex3.pp}}
|
||||
\html{\input{sysutex/ex3.tex}}
|
||||
\FPCexample{ex3}
|
||||
|
||||
|
||||
\begin{procedure}{DateTimeToString}
|
||||
\Declaration
|
||||
@ -470,8 +493,8 @@ raised.
|
||||
\seef{FormatDateTime}, \sees{formatchars}.
|
||||
\end{procedure}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex4.pp}}
|
||||
\html{\input{sysutex/ex4.tex}}
|
||||
\FPCexample{ex4}
|
||||
|
||||
|
||||
\begin{procedure}{DateTimeToSystemTime}
|
||||
\Declaration
|
||||
@ -486,8 +509,8 @@ None.
|
||||
\seef{DateTimeToTimeStamp}
|
||||
\end{procedure}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex5.pp}}
|
||||
\html{\input{sysutex/ex5.tex}}
|
||||
\FPCexample{ex5}
|
||||
|
||||
|
||||
\begin{function}{DateTimeToTimeStamp}
|
||||
\Declaration
|
||||
@ -502,8 +525,8 @@ None.
|
||||
\seep{DateTimeToSystemTime}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex6.pp}}
|
||||
\html{\input{sysutex/ex6.tex}}
|
||||
\FPCexample{ex6}
|
||||
|
||||
|
||||
\begin{function}{DateToStr}
|
||||
\Declaration
|
||||
@ -520,8 +543,8 @@ None.
|
||||
\end{function}
|
||||
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex7.pp}}
|
||||
\html{\input{sysutex/ex7.tex}}
|
||||
\FPCexample{ex7}
|
||||
|
||||
|
||||
\begin{function}{DayOfWeek}
|
||||
\Declaration
|
||||
@ -539,8 +562,8 @@ None.
|
||||
\end{function}
|
||||
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex8.pp}}
|
||||
\html{\input{sysutex/ex8.tex}}
|
||||
\FPCexample{ex8}
|
||||
|
||||
|
||||
\begin{procedure}{DecodeDate}
|
||||
\Declaration
|
||||
@ -554,8 +577,8 @@ None.
|
||||
\seef{EncodeDate}, \seep{DecodeTime}.
|
||||
\end{procedure}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex9.pp}}
|
||||
\html{\input{sysutex/ex9.tex}}
|
||||
\FPCexample{ex9}
|
||||
|
||||
|
||||
|
||||
\begin{procedure}{DecodeTime}
|
||||
@ -571,8 +594,8 @@ None.
|
||||
\seef{EncodeTime}, \seep{DecodeDate}.
|
||||
\end{procedure}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex10.pp}}
|
||||
\html{\input{sysutex/ex10.tex}}
|
||||
\FPCexample{ex10}
|
||||
|
||||
|
||||
\begin{function}{EncodeDate}
|
||||
\Declaration
|
||||
@ -594,8 +617,8 @@ In case one of the parameters is out of it's valid range, 0 is returned.
|
||||
\seef{EncodeTime}, \seep{DecodeDate}.
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex11.pp}}
|
||||
\html{\input{sysutex/ex11.tex}}
|
||||
\FPCexample{ex11}
|
||||
|
||||
|
||||
\begin{function}{EncodeTime}
|
||||
\Declaration
|
||||
@ -617,8 +640,8 @@ In case one of the parameters is outside of it's valid range, 0 is returned.
|
||||
\seef{EncodeDate}, \seep{DecodeTime}.
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex12.pp}}
|
||||
\html{\input{sysutex/ex12.tex}}
|
||||
\FPCexample{ex12}
|
||||
|
||||
|
||||
|
||||
\begin{function}{FileDateToDateTime}
|
||||
@ -635,8 +658,8 @@ None.
|
||||
\seef{DateTimeToFileDate}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex13.pp}}
|
||||
\html{\input{sysutex/ex13.tex}}
|
||||
\FPCexample{ex13}
|
||||
|
||||
|
||||
\begin{function}{FormatDateTime}
|
||||
\Declaration
|
||||
@ -653,8 +676,8 @@ On error (such as an invalid character in the formatting string), and
|
||||
\seef{StrToDateTime}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex14.pp}}
|
||||
\html{\input{sysutex/ex14.tex}}
|
||||
\FPCexample{ex14}
|
||||
|
||||
|
||||
|
||||
\begin{function}{IncMonth}
|
||||
@ -672,8 +695,8 @@ None.
|
||||
\end{function}
|
||||
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex15.pp}}
|
||||
\html{\input{sysutex/ex15.tex}}
|
||||
\FPCexample{ex15}
|
||||
|
||||
|
||||
\begin{function}{IsLeapYear}
|
||||
\Declaration
|
||||
@ -687,8 +710,8 @@ None.
|
||||
\seef{IncMonth}, \seef{Date}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex16.pp}}
|
||||
\html{\input{sysutex/ex16.tex}}
|
||||
\FPCexample{ex16}
|
||||
|
||||
|
||||
\begin{function}{MSecsToTimeStamp}
|
||||
\Declaration
|
||||
@ -705,8 +728,8 @@ None.
|
||||
\seef{TimeStampToMSecs}, \seef{DateTimeToTimeStamp},
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex17.pp}}
|
||||
\html{\input{sysutex/ex17.tex}}
|
||||
\FPCexample{ex17}
|
||||
|
||||
|
||||
\begin{function}{Now}
|
||||
\Declaration
|
||||
@ -720,8 +743,8 @@ None.
|
||||
\seef{Date}, \seef{Time}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex18.pp}}
|
||||
\html{\input{sysutex/ex18.tex}}
|
||||
\FPCexample{ex18}
|
||||
|
||||
|
||||
\begin{function}{StrToDate}
|
||||
\Declaration
|
||||
@ -743,8 +766,8 @@ an \var{EConvertError} exception is raised.
|
||||
\seef{StrToTime}, \seef{DateToStr}n \seef{TimeToStr}.
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex19.pp}}
|
||||
\html{\input{sysutex/ex19.tex}}
|
||||
\FPCexample{ex19}
|
||||
|
||||
|
||||
\begin{function}{StrToDateTime}
|
||||
\Declaration
|
||||
@ -766,8 +789,8 @@ an \var{EConvertError} exception is raised.
|
||||
\seef{StrToDate}, \seef{StrToTime}, \seef{DateTimeToStr}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex20.pp}}
|
||||
\html{\input{sysutex/ex20.tex}}
|
||||
\FPCexample{ex20}
|
||||
|
||||
|
||||
\begin{function}{StrToTime}
|
||||
\Declaration
|
||||
@ -784,8 +807,8 @@ an \var{EConvertError} exception is raised.
|
||||
\seef{StrToDate}, \seef{StrToDateTime}, \seef{TimeToStr}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex21.pp}}
|
||||
\html{\input{sysutex/ex21.tex}}
|
||||
\FPCexample{ex21}
|
||||
|
||||
|
||||
\begin{function}{SystemTimeToDateTime}
|
||||
\Declaration
|
||||
@ -799,8 +822,8 @@ None.
|
||||
\seep{DateTimeToSystemTime}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex22.pp}}
|
||||
\html{\input{sysutex/ex22.tex}}
|
||||
\FPCexample{ex22}
|
||||
|
||||
|
||||
\begin{function}{Time}
|
||||
\Declaration
|
||||
@ -815,8 +838,8 @@ None.
|
||||
\end{function}
|
||||
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex23.pp}}
|
||||
\html{\input{sysutex/ex23.tex}}
|
||||
\FPCexample{ex23}
|
||||
|
||||
|
||||
\begin{function}{TimeStampToDateTime}
|
||||
\Declaration
|
||||
@ -830,8 +853,8 @@ None.
|
||||
\seef{DateTimeToTimeStamp}, \seef{TimeStampToMSecs}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex24.pp}}
|
||||
\html{\input{sysutex/ex24.tex}}
|
||||
\FPCexample{ex24}
|
||||
|
||||
|
||||
\begin{function}{TimeStampToMSecs}
|
||||
\Declaration
|
||||
@ -863,8 +886,8 @@ None.
|
||||
\SeeAlso
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex25.pp}}
|
||||
\html{\input{sysutex/ex25.tex}}
|
||||
\FPCexample{ex25}
|
||||
|
||||
|
||||
|
||||
\section{Disk functions}
|
||||
@ -911,12 +934,12 @@ In case of an error, the function returns \var{False}.
|
||||
\seef{RemoveDir}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex26.pp}}
|
||||
\html{\input{sysutex/ex26.tex}}
|
||||
\FPCexample{ex26}
|
||||
|
||||
|
||||
\begin{functionl}{DiskFree}{DiskFreeSys}
|
||||
\Declaration
|
||||
Function DiskFree(Drive : Byte) : Longint;
|
||||
Function DiskFree(Drive : Byte) : Int64;
|
||||
\Description
|
||||
\var{DiskFree} returns the free space (in bytes) on disk \var{Drive}.
|
||||
Drive is the number of the disk drive:
|
||||
@ -939,12 +962,12 @@ On error, \var{-1} is returned.
|
||||
\seefl{DiskSize}{DiskSizeSys}, \seef{AddDisk}
|
||||
\end{functionl}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex27.pp}}
|
||||
\html{\input{sysutex/ex27.tex}}
|
||||
\FPCexample{ex27}
|
||||
|
||||
|
||||
\begin{functionl}{DiskSize}{DiskSizeSys}
|
||||
\Declaration
|
||||
Function DiskSize(Drive : Byte) : Longint;
|
||||
Function DiskSize(Drive : Byte) : Int64;
|
||||
\Description
|
||||
\var{DiskSize} returns the size (in bytes) of disk \var{Drive}.
|
||||
Drive is the number of the disk drive:
|
||||
@ -980,8 +1003,8 @@ None.
|
||||
\seef{SetCurrentDir}, \seef{DiskFree}, \seef{DiskSize}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex28.pp}}
|
||||
\html{\input{sysutex/ex28.tex}}
|
||||
\FPCexample{ex28}
|
||||
|
||||
|
||||
\begin{function}{RemoveDir}
|
||||
\Declaration
|
||||
@ -1011,8 +1034,8 @@ In case of error, \var{False} is returned.
|
||||
\seef{GetCurrentDir}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex29.pp}}
|
||||
\html{\input{sysutex/ex29.tex}}
|
||||
\FPCexample{ex29}
|
||||
|
||||
|
||||
\section{File handling functions}
|
||||
|
||||
@ -1048,8 +1071,8 @@ On error, \var{False} is returned.
|
||||
\seef{FileCreate}, \seef{FileExists}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex31.pp}}
|
||||
\html{\input{sysutex/ex31.tex}}
|
||||
\FPCexample{ex31}
|
||||
|
||||
|
||||
\begin{procedure}{DoDirSeparators}
|
||||
\Declaration
|
||||
@ -1063,8 +1086,8 @@ None.
|
||||
\seef{ExtractFileName}, \seef{ExtractFilePath}
|
||||
\end{procedure}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex32.pp}}
|
||||
\html{\input{sysutex/ex32.tex}}
|
||||
\FPCexample{ex32}
|
||||
|
||||
|
||||
\begin{function}{ExpandFileName}
|
||||
\Declaration
|
||||
@ -1080,8 +1103,8 @@ None.
|
||||
\seef{ExtractFileDrive}, \seef{ExtractFileExt}, \seef{ExtractRelativePath}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex33.pp}}
|
||||
\html{\input{sysutex/ex33.tex}}
|
||||
\FPCexample{ex33}
|
||||
|
||||
|
||||
|
||||
\begin{function}{ExpandUNCFileName}
|
||||
@ -1111,8 +1134,8 @@ None.
|
||||
\seef{ExtractFileDrive}, \seef{ExtractFileExt}, \seef{ExtractRelativePath}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex34.pp}}
|
||||
\html{\input{sysutex/ex34.tex}}
|
||||
\FPCexample{ex34}
|
||||
|
||||
|
||||
\begin{function}{ExtractFileDrive}
|
||||
\Declaration
|
||||
@ -1198,8 +1221,8 @@ None.
|
||||
\seef{ExtractFileDrive}, \seef{ExtractFileExt},
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex35.pp}}
|
||||
\html{\input{sysutex/ex35.tex}}
|
||||
\FPCexample{ex35}
|
||||
|
||||
|
||||
\begin{function}{FileAge}
|
||||
\Declaration
|
||||
@ -1214,8 +1237,8 @@ In case of errors, \var{-1} is returned.
|
||||
\seef{FileDateToDateTime}, \seef{FileExists}, \seef{FileGetAttr}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex36.pp}}
|
||||
\html{\input{sysutex/ex36.tex}}
|
||||
\FPCexample{ex36}
|
||||
|
||||
|
||||
|
||||
\begin{procedure}{FileClose}
|
||||
@ -1251,8 +1274,8 @@ returns \var{-1}.
|
||||
\seef{FileTruncate}, \seef{FileSeek}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex37.pp}}
|
||||
\html{\input{sysutex/ex37.tex}}
|
||||
\FPCexample{ex37}
|
||||
|
||||
|
||||
\begin{function}{FileExists}
|
||||
\Declaration
|
||||
@ -1267,8 +1290,8 @@ None.
|
||||
\end{function}
|
||||
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex38.pp}}
|
||||
\html{\input{sysutex/ex38.tex}}
|
||||
\FPCexample{ex38}
|
||||
|
||||
|
||||
|
||||
\begin{function}{FileGetAttr}
|
||||
@ -1294,8 +1317,8 @@ In case of error, -1 is returned.
|
||||
\seef{FileSetAttr}, \seef{FileAge}, \seef{FileGetDate}.
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex40.pp}}
|
||||
\html{\input{sysutex/ex40.tex}}
|
||||
\FPCexample{ex40}
|
||||
|
||||
|
||||
\begin{function}{FileGetDate}
|
||||
\Declaration
|
||||
@ -1311,8 +1334,8 @@ On error, -1 is returned.
|
||||
\seef{FileAge}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex39.pp}}
|
||||
\html{\input{sysutex/ex39.tex}}
|
||||
\FPCexample{ex39}
|
||||
|
||||
|
||||
\begin{function}{FileOpen}
|
||||
\Declaration
|
||||
@ -1371,8 +1394,8 @@ On error, an empty string is returned.
|
||||
\seef{ExpandFileName}, \seef{FindFirst}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex41.pp}}
|
||||
\html{\input{sysutex/ex41.tex}}
|
||||
\FPCexample{ex41}
|
||||
|
||||
|
||||
\begin{function}{FileSeek}
|
||||
\Declaration
|
||||
@ -1398,8 +1421,8 @@ On error, -1 is returned.
|
||||
\seef{FileRead}, \seef{FileTruncate}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex42.pp}}
|
||||
\html{\input{sysutex/ex42.tex}}
|
||||
\FPCexample{ex42}
|
||||
|
||||
|
||||
For an example, see \seef{FileCreate}
|
||||
|
||||
@ -1508,8 +1531,8 @@ On error the function returns -1 on linux, a nonzero error code on Windows.
|
||||
\seep{FindClose}{FindCloseSys}, \seef{FindNext}.
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex43.pp}}
|
||||
\html{\input{sysutex/ex43.tex}}
|
||||
\FPCexample{ex43}
|
||||
|
||||
|
||||
\begin{function}{FindNext}
|
||||
\Declaration
|
||||
@ -1544,8 +1567,8 @@ None.
|
||||
\seef{ExtractRelativePath}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex45.pp}}
|
||||
\html{\input{sysutex/ex45.tex}}
|
||||
\FPCexample{ex45}
|
||||
|
||||
|
||||
\begin{function}{RenameFile}
|
||||
\Declaration
|
||||
@ -1561,8 +1584,8 @@ On Error, \var{False} is returned.
|
||||
\seef{DeleteFile}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex44.pp}}
|
||||
\html{\input{sysutex/ex44.tex}}
|
||||
\FPCexample{ex44}
|
||||
|
||||
|
||||
\begin{function}{SetDirSeparators}
|
||||
\Declaration
|
||||
@ -1576,8 +1599,8 @@ None.
|
||||
\seef{ExpandFileName}, \seef{ExtractFilePath}, \seef{ExtractFileDir}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex47.pp}}
|
||||
\html{\input{sysutex/ex47.tex}}
|
||||
\FPCexample{ex47}
|
||||
|
||||
|
||||
\section{PChar functions}
|
||||
|
||||
@ -1651,8 +1674,8 @@ If no more memory is available, a runtime error occurs.
|
||||
\seefl{StrAlloc}{StrAllocSys}.\seepl{StrDispose}{StrDisposeSys}.
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex46.pp}}
|
||||
\html{\input{sysutex/ex46.tex}}
|
||||
\FPCexample{ex46}
|
||||
|
||||
|
||||
|
||||
\begin{procedurel}{StrDispose}{StrDisposeSys}
|
||||
@ -1734,8 +1757,8 @@ None.
|
||||
\seef{AnsiCompareStr}, \seef{AnsiCompareText}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex48.pp}}
|
||||
\html{\input{sysutex/ex48.tex}}
|
||||
\FPCexample{ex48}
|
||||
|
||||
|
||||
\begin{function}{AnsiCompareStr}
|
||||
\Declaration
|
||||
@ -1757,8 +1780,8 @@ None.
|
||||
\seef{AdjustLineBreaks}, \seef{AnsiCompareText}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex49.pp}}
|
||||
\html{\input{sysutex/ex49.tex}}
|
||||
\FPCexample{ex49}
|
||||
|
||||
|
||||
\begin{function}{AnsiCompareText}
|
||||
\Declaration
|
||||
@ -1781,8 +1804,8 @@ None.
|
||||
\seef{AdjustLineBreaks}, \seef{AnsiCompareText}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex50.pp}}
|
||||
\html{\input{sysutex/ex50.tex}}
|
||||
\FPCexample{ex50}
|
||||
|
||||
|
||||
\begin{function}{AnsiExtractQuotedStr}
|
||||
\Declaration
|
||||
@ -1798,8 +1821,8 @@ None.
|
||||
\seef{AnsiQuotedStr}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex51.pp}}
|
||||
\html{\input{sysutex/ex51.tex}}
|
||||
\FPCexample{ex51}
|
||||
|
||||
|
||||
\begin{function}{AnsiLastChar}
|
||||
\Declaration
|
||||
@ -1814,8 +1837,8 @@ None.
|
||||
\seef{AnsiStrLastChar}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex52.pp}}
|
||||
\html{\input{sysutex/ex52.tex}}
|
||||
\FPCexample{ex52}
|
||||
|
||||
|
||||
\begin{function}{AnsiLowerCase}
|
||||
\Declaration
|
||||
@ -1834,8 +1857,8 @@ None.
|
||||
\seef{AnsiUpperCase}, \seef{AnsiStrLower}, \seef{AnsiStrUpper}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex53.pp}}
|
||||
\html{\input{sysutex/ex53.tex}}
|
||||
\FPCexample{ex53}
|
||||
|
||||
|
||||
\begin{function}{AnsiQuotedStr}
|
||||
\Declaration
|
||||
@ -1873,8 +1896,8 @@ None.
|
||||
\seef{AnsiCompareText}, \seef{AnsiCompareStr}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex54.pp}}
|
||||
\html{\input{sysutex/ex54.tex}}
|
||||
\FPCexample{ex54}
|
||||
|
||||
|
||||
\begin{function}{AnsiStrIComp}
|
||||
\Declaration
|
||||
@ -1895,8 +1918,8 @@ None.
|
||||
\seef{AnsiCompareText}, \seef{AnsiCompareStr}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex55.pp}}
|
||||
\html{\input{sysutex/ex55.tex}}
|
||||
\FPCexample{ex55}
|
||||
|
||||
|
||||
\begin{function}{AnsiStrLastChar}
|
||||
\Declaration
|
||||
@ -1911,8 +1934,8 @@ None.
|
||||
\seef{AnsiLastChar}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex58.pp}}
|
||||
\html{\input{sysutex/ex58.tex}}
|
||||
\FPCexample{ex58}
|
||||
|
||||
|
||||
\begin{function}{AnsiStrLComp}
|
||||
\Declaration
|
||||
@ -1934,8 +1957,8 @@ None.
|
||||
\seef{AnsiCompareText}, \seef{AnsiCompareStr}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex56.pp}}
|
||||
\html{\input{sysutex/ex56.tex}}
|
||||
\FPCexample{ex56}
|
||||
|
||||
|
||||
\begin{function}{AnsiStrLIComp}
|
||||
\Declaration
|
||||
@ -1957,8 +1980,8 @@ None.
|
||||
\seef{AnsiCompareText}, \seef{AnsiCompareStr}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex57.pp}}
|
||||
\html{\input{sysutex/ex57.tex}}
|
||||
\FPCexample{ex57}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1980,8 +2003,8 @@ None.
|
||||
\seef{AnsiStrUpper}, \seef{AnsiLowerCase}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex59.pp}}
|
||||
\html{\input{sysutex/ex59.tex}}
|
||||
\FPCexample{ex59}
|
||||
|
||||
|
||||
\begin{function}{AnsiStrUpper}
|
||||
\Declaration
|
||||
@ -2001,8 +2024,8 @@ None.
|
||||
\seef{AnsiUpperCase}, \seef{AnsiStrLower}, \seef{AnsiLowerCase}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex60.pp}}
|
||||
\html{\input{sysutex/ex60.tex}}
|
||||
\FPCexample{ex60}
|
||||
|
||||
|
||||
\begin{function}{AnsiUpperCase}
|
||||
\Declaration
|
||||
@ -2021,8 +2044,8 @@ None.
|
||||
\seef{AnsiStrUpper}, \seef{AnsiStrLower}, \seef{AnsiLowerCase}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex61.pp}}
|
||||
\html{\input{sysutex/ex61.tex}}
|
||||
\FPCexample{ex61}
|
||||
|
||||
|
||||
\begin{procedure}{AppendStr}
|
||||
\Declaration
|
||||
@ -2038,8 +2061,8 @@ None.
|
||||
\seep{AssignStr},\seef{NewStr}, \seep{DisposeStr}
|
||||
\end{procedure}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex62.pp}}
|
||||
\html{\input{sysutex/ex62.tex}}
|
||||
\FPCexample{ex62}
|
||||
|
||||
|
||||
\begin{procedure}{AssignStr}
|
||||
\Declaration
|
||||
@ -2057,8 +2080,8 @@ None.
|
||||
\seef{NewStr}, \seep{AppendStr}, \seep{DisposeStr}
|
||||
\end{procedure}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex63.pp}}
|
||||
\html{\input{sysutex/ex63.tex}}
|
||||
\FPCexample{ex63}
|
||||
|
||||
|
||||
\begin{function}{BCDToInt}
|
||||
\Declaration
|
||||
@ -2071,8 +2094,8 @@ None.
|
||||
\seef{StrToInt}, \seef{IntToStr}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex64.pp}}
|
||||
\html{\input{sysutex/ex64.tex}}
|
||||
\FPCexample{ex64}
|
||||
|
||||
|
||||
|
||||
\begin{function}{CompareMem}
|
||||
@ -2115,8 +2138,8 @@ None.
|
||||
\seef{AnsiCompareText}, \seef{AnsiCompareStr}, \seef{CompareText}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex65.pp}}
|
||||
\html{\input{sysutex/ex65.tex}}
|
||||
\FPCexample{ex65}
|
||||
|
||||
|
||||
\begin{function}{CompareText}
|
||||
\Declaration
|
||||
@ -2139,8 +2162,8 @@ None.
|
||||
\seef{AnsiCompareText}, \seef{AnsiCompareStr}, \seef{CompareStr}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex66.pp}}
|
||||
\html{\input{sysutex/ex66.tex}}
|
||||
\FPCexample{ex66}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -2183,8 +2206,8 @@ None.
|
||||
%, \seef{FormatFloat}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex67.pp}}
|
||||
\html{\input{sysutex/ex67.tex}}
|
||||
\FPCexample{ex67}
|
||||
|
||||
|
||||
\begin{function}{FloatToStrF}
|
||||
\Declaration
|
||||
@ -2233,8 +2256,8 @@ None.
|
||||
\seef{FloatToStr}, \seef{FloatToText}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex68.pp}}
|
||||
\html{\input{sysutex/ex68.tex}}
|
||||
\FPCexample{ex68}
|
||||
|
||||
|
||||
\begin{function}{FloatToText}
|
||||
\Declaration
|
||||
@ -2254,8 +2277,8 @@ None.
|
||||
\seef{FloatToStr}, \seef{FloatToStrF}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex69.pp}}
|
||||
\html{\input{sysutex/ex69.tex}}
|
||||
\FPCexample{ex69}
|
||||
|
||||
|
||||
\begin{procedure}{FmtStr}
|
||||
\Declaration
|
||||
@ -2270,8 +2293,8 @@ In case of error, a \var{EConvertError} exception is raised.
|
||||
\seef{Format}, \seef{FormatBuf}.
|
||||
\end{procedure}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex70.pp}}
|
||||
\html{\input{sysutex/ex70.tex}}
|
||||
\FPCexample{ex70}
|
||||
|
||||
|
||||
\begin{function}{Format}
|
||||
\Declaration
|
||||
@ -2387,8 +2410,8 @@ errors are:
|
||||
\seef{FormatBuf}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex71.pp}}
|
||||
\html{\input{sysutex/ex71.tex}}
|
||||
\FPCexample{ex71}
|
||||
|
||||
|
||||
\begin{function}{FormatBuf}
|
||||
\Declaration
|
||||
@ -2399,8 +2422,8 @@ Function FormatBuf(Var Buffer; BufLen : Cardinal; Const Fmt; fmtLen : Cardinal;
|
||||
\SeeAlso
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex72.pp}}
|
||||
\html{\input{sysutex/ex72.tex}}
|
||||
\FPCexample{ex72}
|
||||
|
||||
|
||||
\begin{function}{IntToHex}
|
||||
\Declaration
|
||||
@ -2417,8 +2440,8 @@ None.
|
||||
\seef{IntToStr}, \var{StrToInt}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex73.pp}}
|
||||
\html{\input{sysutex/ex73.tex}}
|
||||
\FPCexample{ex73}
|
||||
|
||||
|
||||
\begin{function}{IntToStr}
|
||||
\Declaration
|
||||
@ -2434,8 +2457,8 @@ None.
|
||||
\seef{IntToHex}, \seef{StrToInt}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex74.pp}}
|
||||
\html{\input{sysutex/ex74.tex}}
|
||||
\FPCexample{ex74}
|
||||
|
||||
|
||||
\begin{function}{IsValidIdent}
|
||||
\Declaration
|
||||
@ -2450,9 +2473,22 @@ None.
|
||||
\SeeAlso
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex75.pp}}
|
||||
\html{\input{sysutex/ex75.tex}}
|
||||
\FPCexample{ex75}
|
||||
|
||||
|
||||
\begin{function}{LastDelimiter}
|
||||
\Declaration
|
||||
Function LastDelimiter(const Delimiters, S: string): Integer;
|
||||
\Description
|
||||
\var{LastDelimiter} returns the {\em last} occurrence of any character in
|
||||
the set \var{Delimiters} in the string \var{S}.
|
||||
\Errors
|
||||
\SeeAlso
|
||||
\end{function}
|
||||
|
||||
\FPCexample{ex88}
|
||||
|
||||
|
||||
\begin{function}{LeftStr}
|
||||
\Declaration
|
||||
Function LeftStr(const S: string; Count: integer): string;
|
||||
@ -2465,8 +2501,8 @@ None.
|
||||
\seef{RightStr}, \seef{TrimLeft}, \seef{TrimRight}, \seef{Trim}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex76.pp}}
|
||||
\html{\input{sysutex/ex76.tex}}
|
||||
\FPCexample{ex76}
|
||||
|
||||
|
||||
\begin{function}{LoadStr}
|
||||
\Declaration
|
||||
@ -2491,8 +2527,8 @@ None.
|
||||
\seef{AnsiLowerCase}, \seef{UpperCase}, \seef{AnsiUpperCase}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex77.pp}}
|
||||
\html{\input{sysutex/ex77.tex}}
|
||||
\FPCexample{ex77}
|
||||
|
||||
|
||||
\begin{functionl}{NewStr}{NewStrSys}
|
||||
\Declaration
|
||||
@ -2525,8 +2561,8 @@ None.
|
||||
\seef{AnsiQuotedStr}, \seef{AnsiExtractQuotedStr}.
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex78.pp}}
|
||||
\html{\input{sysutex/ex78.tex}}
|
||||
\FPCexample{ex78}
|
||||
|
||||
|
||||
|
||||
\begin{function}{RightStr}
|
||||
@ -2544,8 +2580,8 @@ None.
|
||||
\seef{LeftStr},\seef{Trim}, \seef{TrimLeft}, \seef{TrimRight}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex79.pp}}
|
||||
\html{\input{sysutex/ex79.tex}}
|
||||
\FPCexample{ex79}
|
||||
|
||||
|
||||
\begin{function}{StrFmt}
|
||||
\Declaration
|
||||
@ -2561,8 +2597,8 @@ for a list of errors, see \seef{Format}.
|
||||
\seef{StrLFmt}, \seep{FmtStr}, \seef{Format}, \seef{FormatBuf}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex80.pp}}
|
||||
\html{\input{sysutex/ex80.tex}}
|
||||
\FPCexample{ex80}
|
||||
|
||||
|
||||
\begin{function}{StrLFmt}
|
||||
\Declaration
|
||||
@ -2578,8 +2614,8 @@ for a list of errors, see \seef{Format}.
|
||||
\seef{StrFmt}, \seep{FmtStr}, \seef{Format}, \seef{FormatBuf}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex81.pp}}
|
||||
\html{\input{sysutex/ex81.tex}}
|
||||
\FPCexample{ex81}
|
||||
|
||||
|
||||
\begin{function}{StrToInt}
|
||||
\Declaration
|
||||
@ -2598,8 +2634,8 @@ In case of error, an \var{EConvertError} is raised.
|
||||
\seef{IntToStr}, \seef{StrToIntDef}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex82.pp}}
|
||||
\html{\input{sysutex/ex82.tex}}
|
||||
\FPCexample{ex82}
|
||||
|
||||
|
||||
\begin{function}{StrToIntDef}
|
||||
\Declaration
|
||||
@ -2617,8 +2653,8 @@ None.
|
||||
\seef{IntToStr}, \seef{StrToInt}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex83.pp}}
|
||||
\html{\input{sysutex/ex83.tex}}
|
||||
\FPCexample{ex83}
|
||||
|
||||
|
||||
\begin{function}{Trim}
|
||||
\Declaration
|
||||
@ -2634,8 +2670,8 @@ None.
|
||||
\seef{TrimLeft}, \seef{TrimRight}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex84.pp}}
|
||||
\html{\input{sysutex/ex84.tex}}
|
||||
\FPCexample{ex84}
|
||||
|
||||
|
||||
\begin{function}{TrimLeft}
|
||||
\Declaration
|
||||
@ -2651,8 +2687,8 @@ None.
|
||||
\seef{Trim}, \seef{TrimRight}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex85.pp}}
|
||||
\html{\input{sysutex/ex85.tex}}
|
||||
\FPCexample{ex85}
|
||||
|
||||
|
||||
\begin{function}{TrimRight}
|
||||
\Declaration
|
||||
@ -2668,8 +2704,8 @@ None.
|
||||
\seef{Trim}, \seef{TrimLeft}
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex86.pp}}
|
||||
\html{\input{sysutex/ex86.tex}}
|
||||
\FPCexample{ex86}
|
||||
|
||||
|
||||
|
||||
\begin{function}{UpperCase}
|
||||
@ -2688,6 +2724,6 @@ None.
|
||||
\SeeAlso
|
||||
\end{function}
|
||||
|
||||
\latex{\lstinputlisting{sysutex/ex87.pp}}
|
||||
\html{\input{sysutex/ex87.tex}}
|
||||
\FPCexample{ex87}
|
||||
|
||||
|
||||
|
117
docs/user.tex
@ -18,8 +18,8 @@
|
||||
% write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
% Boston, MA 02111-1307, USA.
|
||||
%
|
||||
\documentclass{book}
|
||||
%\documentclass{report}
|
||||
%\documentclass{book}
|
||||
\documentclass{report}
|
||||
%
|
||||
% Preamble
|
||||
%
|
||||
@ -30,12 +30,12 @@
|
||||
\ifx\pdfoutput\undefined
|
||||
\usepackage{html}
|
||||
\usepackage{htmllist}
|
||||
% \latex{\usepackage{fpc}}
|
||||
\latex{\usepackage{fpcbook}}
|
||||
\latex{\usepackage{fpc}}
|
||||
% \latex{\usepackage{fpcbook}}
|
||||
\html{\input{fpc-html.tex}}
|
||||
\else
|
||||
% \usepackage{fpc}
|
||||
\usepackage{fpcbook}
|
||||
\usepackage{fpc}
|
||||
% \usepackage{fpcbook}
|
||||
\fi
|
||||
\latex{%
|
||||
\usepackage{times}
|
||||
@ -171,7 +171,8 @@ Let's get on with something useful.
|
||||
The compiler needs at least the following hardware:
|
||||
\begin{enumerate}
|
||||
\item An I386 or higher processor. A coprocessor is not required, although it
|
||||
will slow down your program's performance if you do floating point calculations.
|
||||
will slow down your program's performance if you do floating point calculations
|
||||
without a coprocessor, since an emulation will be used.
|
||||
\item 4 Mb of free memory. Under \dos, if you use DPMI memory management,
|
||||
such as under Windows, you will need at least 16 Mb.
|
||||
\item At least 500 Kb. free disk space.
|
||||
@ -225,9 +226,9 @@ the compiler.
|
||||
|
||||
\begin{htmlonly}
|
||||
The first screen of the installation program looks like this:
|
||||
\htmladdimg{../pics/install1.gif}
|
||||
\fpcaddimg{../pics/install1.png}
|
||||
And the second screen looks like
|
||||
\htmladdimg{../pics/install2.gif}
|
||||
\fpcaddimg{../pics/install2.png}
|
||||
\end{htmlonly}
|
||||
\begin{latexonly}
|
||||
The screen of the installation program looks like figure \ref{fig:install}.
|
||||
@ -235,14 +236,14 @@ The screen of the installation program looks like figure \ref{fig:install}.
|
||||
\caption{The \dos install program screen.}
|
||||
\label{fig:install}
|
||||
\ifpdf
|
||||
\epsfig{file=pics/install1.pdf,width=\textwidth}
|
||||
%\epsfig{file=pics/install.pdf,width=\textwidth}
|
||||
\epsfig{file=pics/install1.png,width=\textwidth}
|
||||
%\epsfig{file=pics/install.png,width=\textwidth}
|
||||
\end{figure}
|
||||
\begin{figure}
|
||||
\caption{The \dos install program screen.}
|
||||
\label{fig:installb}
|
||||
\epsfig{file=pics/install2.pdf,width=\textwidth}
|
||||
%\epsfig{file=pics/install2s.pdf}
|
||||
\epsfig{file=pics/install2.png,width=\textwidth}
|
||||
%\epsfig{file=pics/install2s.png}
|
||||
\else
|
||||
\epsfig{file=pics/install1.eps,width=\textwidth}
|
||||
\epsfig{file=pics/install2.eps,width=\textwidth}
|
||||
@ -290,7 +291,7 @@ The \linux distribution of \fpc comes in three forms:
|
||||
\begin{itemize}
|
||||
\item a \file{tar.gz} version, also available as seperate files.
|
||||
\item a \file{.rpm} (Red Hat Package Manager) version, and
|
||||
\item a \file{.deb} (debian) version.
|
||||
\item a \file{.deb} (Debian) version.
|
||||
\end{itemize}
|
||||
All of these packages contain a \var{ELF} version of the compiler binaries and
|
||||
units. the older \var{aout} binaries are no longer distributed, although you
|
||||
@ -302,7 +303,7 @@ rpm -i fpc-pascal-XXX.rpm
|
||||
\end{verbatim}
|
||||
(\var{XXX} is the version number of the \file{.rpm} file)
|
||||
|
||||
If you use debian, installation is limited to
|
||||
If you use Debian, installation is limited to
|
||||
\begin{verbatim}
|
||||
dpkg -i fpc-XXX.deb
|
||||
\end{verbatim}
|
||||
@ -419,10 +420,11 @@ ppc386 -Fuc:\pp\units\go32v2\rtl hello
|
||||
\end{verbatim}
|
||||
under \dos, and under \linux you could type
|
||||
\begin{verbatim}
|
||||
ppc386 -Fu/usr/lib/fpc/0.99.14/units/linux/rtl hello
|
||||
ppc386 -Fu/usr/lib/fpc/NNN/units/linux/rtl hello
|
||||
\end{verbatim}
|
||||
(replace \var{NNN} with the version number of \fpc that you are using).
|
||||
This is, of course, assuming that you installed under \verb|C:\PP| or
|
||||
\file{/usr/lib/fpc/0.99.14}, respectively.
|
||||
\file{/usr/lib/fpc/NNN}, respectively.
|
||||
|
||||
If you got no error messages, the compiler has generated an executable
|
||||
called \file{hello} (no extension) under \linux, and a file \file{hello.exe}
|
||||
@ -498,8 +500,8 @@ look for compiled versions of these units in the following way:
|
||||
(not under \linux)
|
||||
\item It will look in all the directories specified in the unit search path.
|
||||
\end{enumerate}
|
||||
You can add a directory to the unit search path with the \var{-Fu} option
|
||||
(\seeo{Fu}). Every occurrence of one of this options will {\em insert}
|
||||
You can add a directory to the unit search path with the (\seeo{Fu})
|
||||
option. Every occurrence of one of this options will {\em insert}
|
||||
a directory to the unit search path. i.e. last path on the command line
|
||||
will be searched first.
|
||||
|
||||
@ -577,14 +579,13 @@ If you include files in your source with the \var{\{\$I filename\}}
|
||||
directive, the compiler will look for it in the following places:
|
||||
|
||||
\begin{enumerate}
|
||||
\item It will look in the path specified in the incude file name.
|
||||
\item It will look in the path specified in the include file name.
|
||||
\item It will look in the directory where the current source file is.
|
||||
\item it will look in all directories specified in the include file search
|
||||
path.
|
||||
\end{enumerate}
|
||||
You can add files to the include file search
|
||||
path with the \var{-I} (\seeo{I})
|
||||
option.
|
||||
You can add files to the include file search path with the \seeo{I} or
|
||||
\seeo{Fi} options.
|
||||
|
||||
As an example, consider the following include statement in a file
|
||||
\file{units/foo.pp}:
|
||||
@ -616,13 +617,12 @@ files:
|
||||
\item It will look in the directory where the current source file is.
|
||||
\item it will look in all directories specified in the object file search path.
|
||||
\end{enumerate}
|
||||
You can add files to the object file search path with the \var{-Fo} (\seeo{Fo})
|
||||
option.
|
||||
You can add files to the object file search path with the \seeo{Fo} option.
|
||||
|
||||
% Configuration file
|
||||
\subsection{Configuration file}
|
||||
\label{searchconfig}
|
||||
Unless you specify the \var{-n} (\seeo{n}) option, the compiler will look
|
||||
Unless you specify the \seeo{n} option, the compiler will look
|
||||
for a configuration file \file{ppc386.cfg} in the following places:
|
||||
|
||||
\begin{itemize}
|
||||
@ -865,14 +865,14 @@ full in the programmers guide.
|
||||
\begin{itemize}
|
||||
\item \textbf{IO-error -2 at ...} : Under \linux you can get this message at
|
||||
compiler startup. It means typically that the compiler doesn't find the
|
||||
error definitions file. You can correct this mistake with the \var{-Fr}
|
||||
option under \linux. (\seeo{Fr})
|
||||
error definitions file. You can correct this mistake with the \seeo{Fr}
|
||||
option under \linux.
|
||||
\item \textbf {Error : File not found : xxx} or \textbf{Error: couldn't compile
|
||||
unit xxx}: This typically happens when
|
||||
your unit path isn't set correctly. Remember that the compiler looks for
|
||||
units only in the current directory, and in the directory where the compiler
|
||||
itself is. If you want it to look somewhere else too, you must explicitly
|
||||
tell it to do so using the \var{-Fu} option (\seeo{Fu}). Or you must set op
|
||||
tell it to do so using the \seeo{Fu} option. Or you must set op
|
||||
a configuration file.
|
||||
\end{itemize}
|
||||
|
||||
@ -1015,8 +1015,8 @@ the file named \file{xxx}.
|
||||
\item [-FExxx] tells the compiler to write the executable and units in
|
||||
directory \file{xxx} instead of th current directory.
|
||||
\olabel{FE}
|
||||
\item [-FIxxx] Adds \var{xxx} to the include file search path.
|
||||
\olabel{FI}
|
||||
\item [-Fixxx] Adds \var{xxx} to the include file search path.
|
||||
\olabel{Fi}
|
||||
\item [-Flxxx] Adds \var{xxx} to the library searching path, and is passed
|
||||
to the linker.
|
||||
\olabel{Fl}
|
||||
@ -1047,6 +1047,7 @@ the compiler on \ostwo and \linux. Only with assemblers (such as \gnu
|
||||
|
||||
% Options controlling the kind of output.
|
||||
\subsection{Options controlling the kind of output.}
|
||||
\label{se:codegen}
|
||||
for more information on these options, see also \progref
|
||||
\begin{description}
|
||||
\item [-a] \olabel{a} Tells the compiler not to delete the assembler files
|
||||
@ -1056,7 +1057,7 @@ This also counts for the (possibly) generated batch script.
|
||||
in the assembler file as comments.
|
||||
\item[-ar] \olabel{ar} tells the compiler to list register allocation and
|
||||
release info in the assembler file. This is primarily intended for debugging
|
||||
the code generated bythe compiler.
|
||||
the code generated by the compiler.
|
||||
\item[-at] \olabel{at} tells the compiler to list information about
|
||||
temporary allocations and deallocations in the assembler file.
|
||||
\item [-Axxx] \olabel{A} specifies what kind of assembler should be generated . Here
|
||||
@ -1144,23 +1145,22 @@ the following:
|
||||
\item \textbf{OS2} : OS/2 (2.x) using the \var{EMX} extender.
|
||||
\item \textbf{WIN32} : \windows 32 bit.
|
||||
\end{itemize}
|
||||
\item [-uxxx] \olabel{u} undefine the symbol \var{xxx}. This is the opposite
|
||||
\item [-uxxx] \olabel{u} Undefine the symbol \var{xxx}. This is the opposite
|
||||
of the \var{-d} option.
|
||||
\item [-uxxx] \olabel{U} Undefine symbol \var{xxx}.
|
||||
|
||||
\item [-Xx] \olabel{X} executable options. This tells the compiler what
|
||||
kind of executable should be generated. the parameter \var{x}
|
||||
can be one of the following:
|
||||
\begin{itemize}
|
||||
% \item \textbf{e} : (\linux only) Create an \file{ELF} executable (default).
|
||||
\item \textbf{c} : (\linux only) Link with the C library. You should only use this when
|
||||
you start to port \fpc to another operating system.
|
||||
you start to port \fpc to another operating system. \olabel{Xe}
|
||||
\item \textbf{D} : Link with dynamic libraries (defines the
|
||||
\var{FPC\_LINK\_DYNAMIC} symbol)
|
||||
\item \textbf{s} : Strip the symbols from the executable.
|
||||
\var{FPC\_LINK\_DYNAMIC} symbol) \olabel{XD}
|
||||
\item \textbf{s} : Strip the symbols from the executable. \olabel{Xs}
|
||||
\item \textbf{S} : Link with static units (defines the \var{FPC\_LINK\_STATIC} symbol)
|
||||
\olabel{XS}
|
||||
\item \textbf{X} : Link with smartlinked units (defines the
|
||||
\var{FPC\_LINK\_SMART} symbol)
|
||||
\var{FPC\_LINK\_SMART} symbol) \olabel{XX}
|
||||
\end{itemize}
|
||||
\end{description}
|
||||
|
||||
@ -1170,6 +1170,7 @@ can be one of the following:
|
||||
% Options concerning the sources (language options)
|
||||
|
||||
\subsection{Options concerning the sources (language options)}
|
||||
\label{se:sourceoptions}
|
||||
for more information on these options, see also \progref
|
||||
\begin{description}
|
||||
\item [-Rxxx] \olabel{R} Specifies what kind of assembler you use in
|
||||
@ -1188,6 +1189,7 @@ from \var{-Sd} because some \fpc constructs are still available to you.
|
||||
-=}.
|
||||
\item [-Sd] Tells the compiler to be Delphi compatible. This is more strict
|
||||
than the \var{-S2} option, since some \var{fpc} extensions are switched off.
|
||||
\olabel{Sd}
|
||||
\item [-SeN] \olabel{Se} The compiler stops after the N-th error. Normally,
|
||||
the compiler tries to continue compiling after an error, until 50 errors are
|
||||
reached, or a fatal error is reached, and then it stops. With this switch,
|
||||
@ -1281,7 +1283,7 @@ Syntax:
|
||||
\begin{verbatim}
|
||||
#IFNDEF name
|
||||
\end{verbatim}
|
||||
Lines following \var{\#IFDEF} are skipped read if the keyword \var{name}
|
||||
Lines following \var{\#IFNDEF} are skipped read if the keyword \var{name}
|
||||
following it is defined.
|
||||
|
||||
They are read until the keywords \var{\#ELSE} or \var{\#ENDIF} are
|
||||
@ -1304,7 +1306,7 @@ Syntax:
|
||||
\var{\#ELSE} can be specified after a \var{\#IFDEF} or \var{\#IFNDEF}
|
||||
directive as an alternative.
|
||||
Lines following \var{\#ELSE} are skipped read if the preceding \var{\#IFDEF}
|
||||
\var{\#IFNDEF} was accepted.
|
||||
or \var{\#IFNDEF} was accepted.
|
||||
|
||||
They are skipped until the keyword \var{\#ENDIF} is
|
||||
encountered, after which normal processing is resumed.
|
||||
@ -1312,9 +1314,9 @@ encountered, after which normal processing is resumed.
|
||||
Example :
|
||||
\begin{verbatim}
|
||||
#IFDEF VER0_99_5
|
||||
-Fu/usr/lib/fpc/0.99.6/linuxunits
|
||||
#ELSE
|
||||
-Fu/usr/lib/fpc/0.99.5/linuxunits
|
||||
#ELSE
|
||||
-Fu/usr/lib/fpc/0.99.6/linuxunits
|
||||
#ENDIF
|
||||
\end{verbatim}
|
||||
In the above example, \file{/usr/lib/fpc/0.99.5/linuxunits} will be added to
|
||||
@ -1434,6 +1436,12 @@ On the linux command-line, you must be careful to escape the \var{\$} since
|
||||
otherwise the shell will expand the variable for you, which may have
|
||||
undesired effects.
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% IDE.
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\input{ide.tex}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Porting.
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
@ -1467,7 +1475,7 @@ which are not supported by \fpc. Where possible, we indicate the reason.
|
||||
and will not be changed.
|
||||
\item Parameter lists of previously defined functions and procedures must
|
||||
match exactly. The reason for this is the function overloading mechanism of
|
||||
\fpc. (however, the \var{-So} switch solves this. \seeo{So})
|
||||
\fpc. (however, the \seeo{So} option solves this.)
|
||||
\item \var {(* ... *)} as comment delimiters are not allowed in versions
|
||||
older than 0.9.1. This can easily be remedied with a grown-up editor.
|
||||
\item The \var{MEM, MEMW, MEML} and \var{PORT} variables for memory and port
|
||||
@ -1505,6 +1513,16 @@ which were possible in Turbo Pascal are no longer possible in Free Pascal.
|
||||
\item A file is opened for output only (using \var{fmOutput}) when it is
|
||||
opened with \var{Rewrite}. In order to be able to read from it, it should
|
||||
be reset with \var{Reset}.
|
||||
\item Destructors cannot have parameters. This restriction can be solved by
|
||||
using the \var{-So} switch.
|
||||
\item There can be only one destructor. This restriction can also be
|
||||
solved by using the \var{-So} switch.
|
||||
\item The order in which expressions are evaluated is not necessarily the
|
||||
same. In the following expression:
|
||||
\begin{verbatim}
|
||||
a := g(2) + f(3);
|
||||
\end{verbatim}
|
||||
it is not guaranteed that \var{g(2)} will be evaluated before \var{f(3)}.
|
||||
\end{enumerate}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
@ -1612,9 +1630,9 @@ attempt to mimic the Turbo Pascal compiler in the following ways:
|
||||
the differences between Turbo Pascal and \fpc is that the latter requires
|
||||
you to specify an address operator when assigning a value to a procedural
|
||||
variable. In Turbo Pascal compatibility mode, this is not required.
|
||||
\item Procedure overloading is disabled. This means that function header and
|
||||
implementation can be different (i.e. the function iplementation doesn't
|
||||
need to repeat the function header).
|
||||
\item Procedure overloading is disabled. If procedure overloading is
|
||||
disabled, the function header doesn't need to repeat the function header.
|
||||
|
||||
\item Forward defined procedures don't need the full parameter list when
|
||||
they are defined. Due to the procedure overloading feature of \fpc, you must
|
||||
always specify the parameter list of a function when you define it, even
|
||||
@ -2253,6 +2271,7 @@ which you can debug it using \gnu \var{gdb}.
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Using gdb
|
||||
\section{Using \var{gdb} to debug your program}
|
||||
\label{se:usinggdb}
|
||||
|
||||
To use gdb to debug your program, you can start the debugger, and give it as
|
||||
an option the {\em full} name of your program:
|
||||
@ -3271,7 +3290,7 @@ partition.
|
||||
\dos only. An error occurred when reading from disk. Typically when you try
|
||||
to read past the end of a file.
|
||||
\item [101 Disk write error]
|
||||
\dos only. Reported when the disk is full, and you're trying to write to it.
|
||||
Reported when the disk is full, and you're trying to write to it.
|
||||
\item [102 File not assigned]
|
||||
This is reported by Reset, Rewrite, Append, Rename and Erase, if you call
|
||||
them with an unassigne function as a parameter.
|
||||
@ -3471,4 +3490,4 @@ document pst
|
||||
end
|
||||
\end{verbatim}
|
||||
|
||||
\end{document}
|
||||
\end{document}
|
||||
|