* Do not claim that we ship the very latest version of Perl in the

base system.
* Update links to FreeBSD packages to use the 'Latest/pkgname.tgz'
  link so that we don't have to keep the version numbers updated.
* Expand some </> shorthand.
* Fix a few typos.

PR:		docs/34884
Submitted by:	Ceri <setantae@submonkey.net> (mostly)
This commit is contained in:
Murray Stokely 2002-02-13 10:03:32 +00:00
parent 79a0e7d83c
commit 619cf2ffb4
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=12170

View file

@ -144,9 +144,9 @@
for Visual Basic.</para>
<para>The <ulink
URL="ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/packages/lang/bwbasic-2.10.tgz">Bywater
URL="ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/packages/Latest/bwbasic.tgz">Bywater
Basic Interpreter</ulink> and the <ulink
URL="ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/packages/lang/pbasic-2.0.tgz">Phil
URL="ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/packages/Latest/pbasic.tgz">Phil
Cockroft's Basic Interpreter</ulink> (formerly Rabbit
Basic) are available as <ulink
URL="ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/packages/">FreeBSD
@ -163,7 +163,7 @@
languages that were popular at the time. Instead of
being based on numbers, Lisp is based on lists; in fact
the name is short for <quote>List Processing</quote>.
Very popular in AI (Artificial Intelligence)
Very popular in <acronym>AI</acronym> (Artificial Intelligence)
circles.</para>
<para>Lisp is an extremely powerful and sophisticated
@ -183,7 +183,9 @@
scripts; also often used on World Wide Web servers for
writing <acronym>CGI</acronym> scripts.</para>
<para>The latest version (version 5) comes with FreeBSD.</para>
<para>Perl is installed as <command>/usr/bin/perl</command> in the
FreeBSD base system.</para>
</listitem>
</varlistentry>
@ -198,11 +200,11 @@
abstraction to be used in research work.</para>
<para>FreeBSD has packages of the <ulink
URL="ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/packages/lang/elk-3.0.tgz">Elk
URL="ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/packages/Latest/elk.tgz">Elk
Scheme Interpreter</ulink>, the <ulink
URL="ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/packages/lang/mit-scheme-7.3.tgz">MIT
URL="ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/packages/Latest/mit-scheme.tgz">MIT
Scheme Interpreter</ulink> and the <ulink
URL="ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/packages/lang/scm-4e1.tgz">SCM
URL="ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/packages/Latest/scm.tgz">SCM
Scheme Interpreter</ulink>.</para>
</listitem>
</varlistentry>
@ -212,7 +214,7 @@
<listitem>
<para><ulink
URL="ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/packages/lang/icon-9.0.tgz">The
URL="ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/packages/Latest/icon.tgz">The
Icon Programming Language</ulink>.</para>
</listitem>
</varlistentry>
@ -222,7 +224,7 @@
<listitem>
<para><ulink
URL="ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/packages/lang/ucblogo-3.3.tgz">Brian
URL="ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/packages/Latest/ucblogo.tgz">Brian
Harvey's LOGO Interpreter</ulink>.</para>
</listitem>
</varlistentry>
@ -232,7 +234,7 @@
<listitem>
<para><ulink
URL="ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/packages/lang/python-1.2.tgz">The
URL="ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/packages/Latest/python.tgz">The
Python Object-Oriented Programming
Language</ulink></para>
</listitem>
@ -373,13 +375,13 @@
<command>cc</command> is a front end that manages calling all these
programs with the right arguments for you; simply typing</para>
<screen>&prompt.user; <userinput>cc foobar.c</></screen>
<screen>&prompt.user; <userinput>cc foobar.c</userinput></screen>
<para>will cause <filename>foobar.c</filename> to be compiled by all the
steps above. If you have more than one file to compile, just do
something like</para>
<screen>&prompt.user; <userinput>cc foo.c bar.c</></screen>
<screen>&prompt.user; <userinput>cc foo.c bar.c</userinput></screen>
<para>Note that the syntax checking is just that&mdash;checking
the syntax. It will not check for any logical mistakes you may
@ -394,7 +396,7 @@
</footnote></para>
<para>There are lots and lots of options for <command>cc</command>, which
are all in the man page. Here are a few of the most important
are all in the manual page. Here are a few of the most important
ones, with examples of how to use them.</para>
<variablelist>
@ -412,8 +414,8 @@
</footnote></para>
<informalexample>
<screen>&prompt.user; <userinput>cc foobar.c</> <lineannotation>executable is <filename>a.out</></>
&prompt.user; <userinput>cc -o foobar foobar.c</> <lineannotation>executable is <filename>foobar</></>
<screen>&prompt.user; <userinput>cc foobar.c</userinput> <lineannotation>executable is <filename>a.out</filename></lineannotation>
&prompt.user; <userinput>cc -o foobar foobar.c</userinput> <lineannotation>executable is <filename>foobar</filename></lineannotation>
</screen>
</informalexample>
</listitem>
@ -552,7 +554,7 @@
code</firstterm>.</para>
<para>Generally, you should try to make your code as portable as
possible, as otherwise you may have to completely re-write the
possible, as otherwise you may have to completely rewrite the
program later to get it to work somewhere else&mdash;and who
knows what you may be using in a few years time?</para>
@ -607,8 +609,8 @@
<command>g++</command> on FreeBSD.</para>
<informalexample>
<screen>&prompt.user; <userinput>cc -o foobar foobar.cc -lg++</userinput> <lineannotation>For FreeBSD 2.1.6 and earlier</>
&prompt.user; <userinput>cc -o foobar foobar.cc -lstdc++</userinput> <lineannotation>For FreeBSD 2.2 and later</>
<screen>&prompt.user; <userinput>cc -o foobar foobar.cc -lg++</userinput> <lineannotation>For FreeBSD 2.1.6 and earlier</lineannotation>
&prompt.user; <userinput>cc -o foobar foobar.cc -lstdc++</userinput> <lineannotation>For FreeBSD 2.2 and later</lineannotation>
&prompt.user; <userinput>c++ -o foobar foobar.cc</userinput>
</screen>
</informalexample>
@ -1377,8 +1379,8 @@ DISTFILES= scheme-microcode+dist-7.3-freebsd.tgz
on a few of the basic commands.</para>
<para>Finally, if you find its text-based command-prompt style
off-putting, there is a graphical front-end for it <ulink
URL="../../../../ports/devel.html">xxgdb</ulink> in the ports
off-putting, there is a graphical front-end for it (<ulink
URL="../../../../ports/devel.html">xxgdb</ulink>) in the ports
collection.</para>
<para>This section is intended to be an introduction to using
@ -1460,16 +1462,16 @@ GDB is free software and you are welcome to distribute copies of it
under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for GDB; type "show warranty" for details.
GDB 4.13 (i386-unknown-freebsd), Copyright 1994 Free Software Foundation, Inc.
(gdb) <userinput>break main</> <lineannotation>Skip the set-up code</>
Breakpoint 1 at 0x160f: file temp.c, line 9. <lineannotation><command>gdb</command> puts breakpoint at <function>main()</></>
(gdb) <userinput>run</> <lineannotation>Run as far as <function>main()</></>
Starting program: /home/james/tmp/temp <lineannotation>Program starts running</>
(gdb) <userinput>break main</userinput> <lineannotation>Skip the set-up code</lineannotation>
Breakpoint 1 at 0x160f: file temp.c, line 9. <lineannotation><command>gdb</command> puts breakpoint at <function>main()</function></lineannotation>
(gdb) <userinput>run</userinput> <lineannotation>Run as far as <function>main()</function></lineannotation>
Starting program: /home/james/tmp/temp <lineannotation>Program starts running</lineannotation>
Breakpoint 1, main () at temp.c:9 <lineannotation><command>gdb</command> stops at <function>main()</></>
(gdb) <userinput>n</> <lineannotation>Go to next line</>
This is my program <lineannotation>Program prints out</>
(gdb) <userinput>s</> <lineannotation>step into <function>bazz()</></>
bazz (anint=4231) at temp.c:17 <lineannotation><command>gdb</command> displays stack frame</>
Breakpoint 1, main () at temp.c:9 <lineannotation><command>gdb</command> stops at <function>main()</function></lineannotation>
(gdb) <userinput>n</userinput> <lineannotation>Go to next line</lineannotation>
This is my program <lineannotation>Program prints out</lineannotation>
(gdb) <userinput>s</userinput> <lineannotation>step into <function>bazz()</function></lineannotation>
bazz (anint=4231) at temp.c:17 <lineannotation><command>gdb</command> displays stack frame</lineannotation>
(gdb)</screen>
<para>Hang on a minute! How did <symbol>anint</symbol> get to be
@ -1477,21 +1479,21 @@ bazz (anint=4231) at temp.c:17 <lineannotation><command>gdb</command> displays
<literal>5</literal> in <function>main()</function>? Let's
move up to <function>main()</function> and have a look.</para>
<screen>(gdb) <userinput>up</> <lineannotation>Move up call stack</>
#1 0x1625 in main () at temp.c:11 <lineannotation><command>gdb</command> displays stack frame</>
(gdb) <userinput>p i</> <lineannotation>Show us the value of <symbol>i</></>
$1 = 4231 <lineannotation><command>gdb</command> displays <literal>4231</></></screen>
<screen>(gdb) <userinput>up</userinput> <lineannotation>Move up call stack</lineannotation>
#1 0x1625 in main () at temp.c:11 <lineannotation><command>gdb</command> displays stack frame</lineannotation>
(gdb) <userinput>p i</userinput> <lineannotation>Show us the value of <symbol>i</symbol></lineannotation>
$1 = 4231 <lineannotation><command>gdb</command> displays <literal>4231</literal></lineannotation></screen>
<para>Oh dear! Looking at the code, we forgot to initialise
<symbol>i</symbol>. We meant to put</para>
<programlisting><lineannotation>&hellip;</>
<programlisting><lineannotation>&hellip;</lineannotation>
main() {
int i;
i = 5;
printf("This is my program\n");
<lineannotation>&hellip</></programlisting>
<lineannotation>&hellip</lineannotation></programlisting>
<para>but we left the <literal>i=5;</literal> line out. As we
did not initialise <symbol>i</symbol>, it had whatever number
@ -1788,7 +1790,7 @@ else if (pid == 0) { /* child */
quite big!).</para>
<para>The best way to learn Emacs Lisp is to download the <ulink
URL="ftp://prep.ai.mit.edu/pub/gnu/elisp-manual-19-2.4.tar.gz">Emacs
URL="ftp://ftp.gnu.org/old-gnu/emacs/elisp-manual-19-2.4.tar.gz">Emacs
Tutorial</ulink></para>
<para>However, there is no need to actually know any Lisp to get
@ -2202,11 +2204,11 @@ in font-lock-auto-mode-list"
<filename>.emacs</filename> and add a line for whizbang, such
as:</para>
<programlisting><lineannotation>&hellip;</>
<programlisting><lineannotation>&hellip;</lineannotation>
("\\.lsp$" . lisp-mode)
("\\.wiz$" . whizbang-mode)
("\\.scm$" . scheme-mode)
<lineannotation>&hellip;</></programlisting>
<lineannotation>&hellip;</lineannotation></programlisting>
<para>This means that Emacs will automatically go into
<function>whizbang-mode</function> when you edit a file ending