📄 puman5.n
字号:
.\" Copyright (c) 1980, 1993.\" The Regents of the University of California. All rights reserved..\".\" Redistribution and use in source and binary forms, with or without.\" modification, are permitted provided that the following conditions.\" are met:.\" 1. Redistributions of source code must retain the above copyright.\" notice, this list of conditions and the following disclaimer..\" 2. Redistributions in binary form must reproduce the above copyright.\" notice, this list of conditions and the following disclaimer in the.\" documentation and/or other materials provided with the distribution..\" 3. All advertising materials mentioning features or use of this software.\" must display the following acknowledgement:.\" This product includes software developed by the University of.\" California, Berkeley and its contributors..\" 4. Neither the name of the University nor the names of its contributors.\" may be used to endorse or promote products derived from this software.\" without specific prior written permission..\".\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION).\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF.\" SUCH DAMAGE..\".\" @(#)puman5.n 8.1 (Berkeley) 6/8/93.\".if !\n(xx \{\.so tmac.p \}.ND.nr H1 4.NHDetails on the components of the system.NH 2Options.PPThe programs.PI ,.PC ,and.XPtake a number of options.\*(dg.FS\*(dgAs.IXuses.PIto translate Pascal programs,it takes the options of.PIalso.We refer to them here, however, as.PIoptions..FEThere is a standard.UXconvention for passing options to programs on the command line,and this convention is followed by the.UPsystem programs.As we saw in the examples above,option related arguments consisted of the character `\-' followedby a single character option name..PPExcept for the.B boptionwhich takes a single digit value,each option may be set on (enabled)or off (disabled.)When an on/off valued option appears on the command line of.PIor.PXit inverts the default setting of that option.Thus.LS% \*bpi -l foo.p\fR.LEenables the listing option.B l ,since it defaults off, while.LS% \*bpi -t foo.p\fR.LEdisables the run time tests option.B t ,since it defaults on..PPIn additon to inverting the default settings of.PIoptions on the command line, it is also possible to control the.PIoptions within the body of the program by using comments of a specialform illustrated by.LS{$l-}.LE.PPHere we see that the opening comment delimiter (which could also be a `(*')is immediately followed by the character `$'.After this `$', which signals the start of the option list,we can place a sequence of letters and option controls, separated by `,'characters\*(dd..FS\*(ddThis format was chosen because it is used by Pascal 6000-3.4.In general the options common to both implementations are controlledin the same way so that comment control in options is mostlyportable.It is recommended, however, that only one control be put per comment formaximum portability, as the Pascal 6000-3.4implementation will ignore controlsafter the first one which it does not recognize..FEThe most basic actions for options are to set them, thus.LS{$l+ Enable listing}.LEor to clear them.LS{$t-,p- No run-time tests, no post mortem analysis}.LENotice that `+' always enables an option and `\-' always disables it,no matter what the default is.Thus `\-' has a different meaning in an option comment than it has on thecommand line.As shown in the examples,normal comment text may follow the option list..NH 2Options common to Pi, Pc, and Pix.PPThe following options are common to both the compilerand the interpreter.With each option we give its default setting,the setting it would have if it appeared on the command line,and a sample command using the option.Most options are on/off valued,with the.B boptiontaking a single digit value..SHBuffering of the file output \- b.PPThe.B boption controls the buffering of the file.I output .The default is line buffering, with flushing ateach reference to the file.I inputand under certain other circumstances detailed in section 5below.Mentioning.B bon the command line, e.g..LS% \*bpi -b assembler.p\fR.LEcauses standard output to be block buffered,where a block is some system\-defined number of characters.The.B boption may also be controlled in comments.It, unique among the.UPoptions,takes a single digit value rather than an on or off setting.A value of 0, e.g..LS {$b0}.LEcauses the file.I outputto be unbuffered.Any value 2 or greater causes block buffering and is equivalentto the flag on the command line.The option control comment setting.B bmust precede the.B programstatement..SHInclude file listing \- i.PPThe.B ioption takes the name of an.B includefile,.B procedureor.B functionname and causes itto be listed while translating\*(dg..FS\*(dg\*bInclude\fR files are discussed in section 5.9..FETypical uses would be.LS% \*bpix -i scanner.i compiler.p\fR.LEto make a listing of the routines in the file scanner.i, and.LS% \*bpix -i scanner compiler.p\fR.LEto make a listing of only the routine.I scanner .This option is especially useful for conservation-minded programmers makingpartial program listings..SHMake a listing \- l.PPThe.B loption enables a listing of the program.The.B loption defaults off.When specified on the command line, it causesa header line identifying the version of the translator in useand a line giving the modification time of the file being translatedto appear before the actual program listing.The.B loption is pushed and popped by the.B ioption at appropriate points in the program..SHStandard Pascal only \- s.PPThe.B soption causes many of the features of the.SM UNIXimplementation which are not found in standard Pascalto be diagnosed as `s' warning errors.This option defaults off and is enabled when mentioned on the command line.Some of the features which are diagnosed are:non-standard.B procedure sand.B function s,extensions to the.B procedure.I write ,and the padding of constant strings with blanks.In addition, all letters are mapped to lower case except instrings and characters so that the case of keywords and identifiersis effectively ignored.The.B soption is most useful when a program is to be transported, thus.LS% \*bpi -s isitstd.p\fR.LEwill produce warnings unless the program meets the standard..SHRuntime tests \- t and C.PPTheseoptions control the generation of tests that subrange variablevalues are within bounds at run time..PIdefaults to generating tests and uses the option.B tto disable them..PCdefaults to not generating tests,and uses the option.B Cto enable them.Disabling runtime tests also causes.B assertstatements to be treated as comments.\*(dd.FS\*(ddSee section A.1 for a description of.B assertstatements..FE.SHSuppress warning diagnostics \- w.PPThe.B woption, which defaults on,allows the translator to print a number of warnings about inconsistenciesit finds in the input program.Turning this option off with a comment of the form.LS{$w-}.LEor on the command line.LS% \*bpi -w tryme.p\fR.LEsuppresses these usually useful diagnostics..SHGenerate counters for a pxp execution profile \- z.PPThe.B zoption, which defaults off,enables the production of execution profiles.By specifying.B zon the command line, i.e..LS% \*bpi -z foo.p\fR.LEor by enabling it in a comment before the.B programstatement causes.PIand.PCto insert operations in the interpreter code tocount the number of times each statement was executed.An example of using.XPwas given in section 2.6;its options are described in section 5.6.Note that the.B zoption cannot be used on separately compiled programs..NH 2Options available in Pi.SHPost-mortem dump \- p.PPThe.B poption defaults on,and causes the runtime system to initiate a post-mortembacktrace when an error occurs.It also cause.Xto count statements in the executing program,enforcing a statement limit to prevent infinite loops.Specifying.B pon the command line disables these checks and the abilityto give this post-mortem analysis.It does make smaller and faster programs, however.It is also possible to control the.B poption in comments.To prevent the post-mortem backtrace on error,.B pmust be off at the end of the.B programstatement.Thus, the Pascal cross-reference program was translated with.LS% \*bpi -pbt pxref.p\fR.LE.NH 2Options available in Px.PPThe first argument to.Xis the name of the file containing the program to be interpreted.If no arguments are given, then the file.I objis executed.If more arguments are given, they are available to the Pascalprogram by using the built-ins.I argcand.I argvas described in section 4.6..ne 7.PP.I Pxmay also be invoked automatically.In this case, whenever a Pascal object file name is given as a command,the command will be executed with.Xprepended to it; that is.LS% \*bobj primes\fR.LEwill be converted to read.LS% \*bpx obj primes\fR.LE.NH 2Options available in Pc.SHGenerate assembly language \- S.PPThe program is compiled and the assembly languageoutput is left in file appended .s.Thus.LS% \*bpc -S foo.p\fR.LEcreates a file.I foo.s .No executable file is created..SHSymbolic Debugger Information \- g.PPThe.B goption causes the compiler to generate informationneeded by.I sdb (1)the symbolic debugger.For a complete description of.I sdbsee Volume 2c of the.UXReference Manual..SHRedirect the output file \- o.PPThe.I nameargument after the.B -ois used as the name of the output file instead of.I a.out .Its typical use is to name the compiled program usingthe root of the file name.Thus:.LS% \*bpc -o myprog myprog.p\fR.LEcauses the compiled program to be called.I myprog ..SHGenerate counters for a \*iprof\fP execution profile \- p.PPThe compiler produces code which counts the number of times eachroutine is called.The profiling is based on a periodic sample taken by thesystem rather than by inline counters used by.XP .This results in less degradation in execution,at somewhat of a loss in accuracy.See.I prof (1)for a more complete description..SHRun the object code optimizer \- O.PPThe output of the compiler is run throughthe object code optimizer.This provides an increase in compile time inexchange for a decrease in compiled code sizeand execution time..NH 2Options available in Pxp.PP.I Pxptakes, on its command line, a list of options followed by the program filename, which must end in `.p' as it must for.PI ,.PC ,and.IX ..I Pxp
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -