-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreadme
308 lines (202 loc) · 9.55 KB
/
readme
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
Pascal-FC for PC Compatibles
The software and documentation are supplied subject to the
following conditions:
1. The software and documentation are supplied without any
form of warranty whatsoever, and the authors cannot
accept any liability arising from its use under any
circumstances.
2. The software has been compiled using compilers obtained
under an Educational Licence. It must only be used in
educational institutions, and must under no cir-
cumstances be used for financial gain.
3. The software and documentation may be freely copied.
4. We ask that you cite our work in any publications aris-
ing out of the use of Pascal-FC.
Directory Structure
This release of the Pascal-FC system includes a SETUP pro-
gram that is designed to transfer files from the distribu-
tion floppy to a hard disc (see Chapter 1 of the User
Guide). If you have obtained the distribution by FTP or from
the World-Wide Web, don't run SETUP but simply create a dir-
ectory C;\PASFC and unzip the distribution zip file there. A
directory structure is set up which, by default, has its
root at C;\PASFC. The following diagram illustrates the str-
ucture.
PASFC
|
|
___________________________
| | |
| | |
BIN DOC EX
|
|
________________________________
| | | | | | |
MUTEX SEMS MONS RES CHANS ADA PHILOS
The directory "bin" contains the executable versions of the
compiler and interpreters, together with the pfc command.
The pfc command is a shell script, and the paths p and q
should be edited by the installer as appropriate.
The directory "ex" has a number of subdirectories:
each one of these contains a number of ".pfc" files which
are Pascal-FC source programs.
The directory "doc" contains two documents: "lrm.ps"
is the Language Reference Manual, and "sun_ug.ps is the User
Guide for Sun Systems. Both are in Postscript format, and
have their tables of contents printed at the end.
The distribution disc has an additional subdirectory to
PASFC: SRC. This contains the Pascal source code for the
compiler and interpreters, but this directory is not down-
loaded by the SETUP program.
Addition Information August 2001 - With thanks
to Terry Moore who advised on the inclusion of
these comments
PascalFC dates from the time of Windows 3.1 when DOS
was still a popular operating system. It works in DOS
mode under later versions of Windows with some
qualification.
It seems to be OK under Windows 95 and 98 because
these are built on top of DOS, but the DOS Prompt
is implemented on top of Windows NT and Windows 2000
and this causes some problems.
In Windows 2000, the first character of the first
command parameter is dropped from the command line
for pfccomp, pint and ufpint, and this affects the
batch file, pfc.bat as well. The workaround is to
supply a dummy character (the open quote, `, being
unobtrusive, is a good choice).
When trying to run pint or ufpint, the message
Runtime error R6009, not enough space for environment,
could appear. This can be solved by deleting or
shortening some environment variables. If you still
need them for Windows programs, do not do this in
Windows setup, but use a batch file, or modify
Config.NT, or Autoexec.NT in the WINNT\System32 folder.
See the file pc_up.ps for more details.
====
Addition Material For pc_ug.ps - original of
document not available so please read the following
with original pc_ug.ps
===================================================
Issues when running under Windows 2000 and possibly
Windows NT.
---------------------------------------------------
These programs are run in DOS mode by the DOS Prompt
program. As DOS is not as familiar to PC users as it
once was, we give some brief notes.
DOS
---
A DOS command is of the form given in the example
below.
dir C:\WINNT\System32\*.* | sort > drctry.txt
This lists the names of the files in the directory
C:\WINNT\System32, sorts it, and puts the result into
the file drctry.txt.
The parts after the command, dir, are the command line
parameters and are optional.
The parameter, | sort, is a filter - a program that
takes the output and alters it in some way. Another
example is | more which pauses after each page of
output.
The parameter > drctry.txt is a pipe which is like a
filter except that there is no processing of the output.
The pipe >> drctry.txt would append the
output to the existing file rather than clearing it
first. One can also pipe the results directly to
some other device like a printer.
The pipe, < somefile, would redirect input from a
file instead of the keyboard. This makes no sense
for the dir command, which doesn't require input.
The command
dir /p
lists the current directory (as no path is specified)
and pauses at the end of each screen because of the
command line parameter, /p, which is a built in version
of | more.
DOS and Windows use strings called "environment
variables" to keep information needed for running
programs. DOS users are familiar with the string,
prompt. prompt = $p$g is the most popular value
which makes the prompt the current path followed
by a greater than sign. E. g.
C:\pasfc\ex\mutex>
The path command is also very useful.
path = .;C:\;C:\pasfc\bin
means that when a command is given, if it is one
not built into DOS, the DOS shell looks first in
the current directory for the corresponding program,
then in drive C at the top level, and then in the
directory C:\pasfc\bin.
Problems with PascalFC
----------------------
The first character problem
---------------------------
As pfccomp, pint and ufpint drop the first character
of the first command parameter, you need to type a
dummy character (preferably `). For example
pint `objFile pmdFile < data > results
(to also illustrate piping) is a little more readable
than
pint oobjFile pmdFile < data > results
You can do the same with the pfc command that compiles
and runs a program, but you could avoid the need for
the dummy character if you amend the file pfc.bat by
adding a character at the start of the next string
following each occurrence of pint and ufpint. Don't
use the % character as a dummy because it has a special
meaning in batch files (it defines a variable).
The environment space problem
-----------------------------
A DOS path string (and similarly any other environment
variable) cannot exceed 128 bytes. (In some versions
of DOS this restriction is relaxed, but then the
path cannot be edited in the usual way.) Also, the
total number bytes in the environment variables cannot
exceed 256 bytes, a number which varies with the DOS
version. As Windows can use far more environment
space than DOS, there is often a problem. Also, pint
and ufpint create or amend environment variables and
cannot run if this space is not available.
The path length restriction is unavoidable, but there
are tricks to minimise a path string. However, for
running PascalFC, the path can be quite short.
According to the note, Q33449 - How to Increase MS-DOS
Environment Space, in the Microsoft support web pages,
it is possible to increase the environment space in
Windows NT. However, the fix they give doesn't seem to
work in Windows 2000.
We therefore need to reduce the amount of environment
space used. Changes made in a batch file run under
DOS Prompt will not affect the environment strings stored
in Windows. The path (and the DOS prompt) can be changed
directly. To see the path, without changing it, type
path
To delete the path, type
path ;
To replace the original path with ".;\pasFC\bin", type
path = .;\pasFC\bin
To append the above to the current path, type
path = %path%;.;\pasFC\bin
Apart from 'path' and 'prompt', other environment variables
are set with the 'set' command.
It is a good idea to make a list of all your environment
variables so as to see what to amend, and to make it easier
to amend them. Type
set > setenv.bat
to make a batch file, setenv.bat, containing all the
environment variables. You can then modify this to make
a batch file to reset the environment. Run it by
typing
setenv
Put 'rem ' in front of those variables you want to leave
alone. This turns those lines into comments but keeps them
for future reference. Put 'SET ' in front of the others
and then amend the rest of the line to what you want.
To delete the variable use, for example,
SET commandpath
Preferably make the smallest number of changes necessary.
Perhaps you just need to shorten the 'path' string.
The whole file could be pasted into Autoexec.NT, in the
directory C:\WINNT\System32, but this means that other DOS
programs are stuck with your new environment.