mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-03-10 05:01:50 +09:00
basic moar wip docs
This commit is contained in:
@@ -1 +1,4 @@
|
||||
10 DEFUN FIB(N)=IF N==0 THEN 0 ELSE IF N==1 THEN 1 ELSE FIB(N-1)+FIB(N-2)
|
||||
20 FOR K=1 TO 12
|
||||
30 PRINT FIB(K);" ";
|
||||
40 NEXT
|
||||
|
||||
3
assets/tbas/doc/bibliography.tex
Normal file
3
assets/tbas/doc/bibliography.tex
Normal file
@@ -0,0 +1,3 @@
|
||||
\begin{itemlist}
|
||||
\item \emph{PC-BASIC 2.0.3 Documentation} \\ \url{https://robhagemans.github.io/pcbasic/doc/2.0/}
|
||||
\end{itemlist}
|
||||
3
assets/tbas/doc/facmap.bas
Normal file
3
assets/tbas/doc/facmap.bas
Normal file
@@ -0,0 +1,3 @@
|
||||
10 DEFUN FAC(N)=IF N==0 THEN 1 ELSE N*FAC(N-1)
|
||||
20 K=MAP FAC, 1 TO 10
|
||||
30 PRINT K
|
||||
4
assets/tbas/doc/facrec.bas
Normal file
4
assets/tbas/doc/facrec.bas
Normal file
@@ -0,0 +1,4 @@
|
||||
10 DEFUN FAC(N)=IF N==0 THEN 1 ELSE N*FAC(N-1)
|
||||
20 FOR K=1 TO 6
|
||||
30 PRINT FAC(K)
|
||||
40 NEXT
|
||||
4
assets/tbas/doc/fib.bas
Normal file
4
assets/tbas/doc/fib.bas
Normal file
@@ -0,0 +1,4 @@
|
||||
10 DEFUN FIB(N)=IF N==0 THEN 0 ELSE IF N==1 THEN 1 ELSE FIB(N-1)+FIB(N-2)
|
||||
20 FOR K=1 TO 12
|
||||
30 PRINT FIB(K);" ";
|
||||
40 NEXT
|
||||
@@ -71,8 +71,8 @@ Functions are a form of expression that may taks input arguments surrounded by p
|
||||
\codeline{Y \textbf{= DIM(}X\textbf{)}}\par
|
||||
Returns array with size of \code{X}, all filled with zero.
|
||||
\subsection{GETKEYSDOWN}
|
||||
\codeline{Y \textbf{= GETKEYSDOWN(}X\textbf{)}}\par
|
||||
Returns array that contains keycode of keys held down in \code{X}.\par
|
||||
\codeline{\textbf{GETKEYSDOWN} VARIABLE}\par
|
||||
Stores array that contains keycode of keys held down in \code{VARIABLE}.\par
|
||||
Actual keycode and the array length depends on the machine: in \thismachine , array length will be fixed to 8. For the list of available keycodes, see \ref{technical}.
|
||||
\subsection{INPUT}
|
||||
\codeline{\textbf{INPUT} VARIABLE}\par
|
||||
|
||||
@@ -1,9 +1,19 @@
|
||||
\begin{lstlisting}
|
||||
10 REM TERRAN BASIC
|
||||
20 REM REFERENCE MANUAL
|
||||
30 REM For Version 1.0
|
||||
40 REM First Edition
|
||||
100 PRINT "Hello, world!"
|
||||
110 PRINT "Git gud!"
|
||||
999 END
|
||||
10 DEFUN FAC(N)=IF N==0 THEN 1 ELSE N*FAC(N-1)
|
||||
20 FOR K=1 TO 6
|
||||
30 PRINT FAC(K)
|
||||
40 NEXT
|
||||
\end{lstlisting}
|
||||
|
||||
\begin{lstlisting}
|
||||
10 DEFUN FAC(N)=IF N==0 THEN 1 ELSE N*FAC(N-1)
|
||||
20 K=MAP FAC, 1 TO 10
|
||||
30 PRINT K
|
||||
\end{lstlisting}
|
||||
|
||||
\begin{lstlisting}
|
||||
10 DEFUN FIB(N)=IF N==0 THEN 0 ELSE IF N==1 THEN 1 ELSE FIB(N-1)+FIB(N-2)
|
||||
20 FOR K=1 TO 12
|
||||
30 PRINT FIB(K);" ";
|
||||
40 NEXT
|
||||
\end{lstlisting}
|
||||
|
||||
@@ -179,13 +179,12 @@
|
||||
\chapter{Technical Reference}
|
||||
\input{implementation}
|
||||
|
||||
|
||||
%% Bibliography %%
|
||||
% https://robhagemans.github.io/pcbasic/doc/2.0/
|
||||
|
||||
|
||||
\chapter{Index}
|
||||
|
||||
\chapter{Bibliography}
|
||||
\input{bibliography}
|
||||
|
||||
|
||||
\chapter*{Disclaimers}
|
||||
|
||||
\oreallypress{} is entirely fictional publishing entity; \oreallypress{} has no affiliation whatsoever with any of the real-world publishers.
|
||||
|
||||
Reference in New Issue
Block a user