Skip to content

Commit

Permalink
Updated with Tobias' submissions for SMSQ/E in various versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
NormanDunbar committed Dec 9, 2018
1 parent 4f85750 commit fa51bcb
Show file tree
Hide file tree
Showing 29 changed files with 849 additions and 864 deletions.
34 changes: 34 additions & 0 deletions sphinx/source/D/day-pct.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
.. _day-pct:

DAY%
====

+----------+-------------------------------------------------------------------+
| Syntax | DAY% [datestamp] |
+----------+-------------------------------------------------------------------+
| Location | SMSQ/E |
+----------+-------------------------------------------------------------------+

This function complements the :ref:`date` and :ref:`date-dlr` functions, by returning the day
number corresponding to the given datestamp, or current date, if no datestamp
was given.

**Examples**

::

PRINT DAY% (0)

will print the day part of the QL's epoch, 1 for 1st of January

::

PRINT DAY%

will print the current day number.


**CROSS-REFERENCE**

See :ref:`date`, :ref:`year-pct`, :ref:`month-pct`.

1 change: 1 addition & 0 deletions sphinx/source/D/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Keywords D
date.rst
date-dlr.rst
day-dlr.rst
day-pct.rst
dbl.rst
ddown.rst
deallocate.rst
Expand Down
33 changes: 33 additions & 0 deletions sphinx/source/F/fet.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
.. _fet:

FET
===

+----------+-------------------------------------------------------------------+
| Syntax | FET(file :sup:`*`\ [,{filex | #chx}]\ :sup:`*` [;cmd$]) |
+----------+-------------------------------------------------------------------+
| Location | SMSQ/E |
+----------+-------------------------------------------------------------------+

Executes and returns the job ID of the job filename in suspended state (by
immediately setting the new job's priority to zero).
This function is a functional version of :ref:`et`, with the same set of arguments,
that executes a job into suspended state for tracing with a monitor. In addition
to what :ref:`et` does, it returns the job ID of the new job that was started.


**Examples**

::

jId = FEX ("win1_XChange_xchange")

Will start Psion XChange in win1_xchange in suspended state and return the job
ID of the new job.



**CROSS-REFERENCE**

See :ref:`et`, :ref:`exec`, :ref:`jobs`.

32 changes: 32 additions & 0 deletions sphinx/source/F/few.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
.. _few:

FEW
===

+----------+-------------------------------------------------------------------+
| Syntax | FEW(filen :sup:`*`\ [,{filex | #chx}]\ :sup:`*` [;cmd$]) |
+----------+-------------------------------------------------------------------+
| Location | SMSQ/E |
+----------+-------------------------------------------------------------------+

Executes and waits for completion of the job filen, then returns the error code
from that job. FEW is a function version of :ref:`ew` and shares its argument list.


**Example**

::

retcode = FEW ("win1_XChange_xchange")

Will start Psion XChange in win1_xchange, wait until that job has ended and will
then return the error code of that job.



**CROSS-REFERENCE**

See :ref:`ew`,
:ref:`exec-w`,
:ref:`jobs`.

34 changes: 34 additions & 0 deletions sphinx/source/F/fex-m.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
.. _fex-m:

FEX\_M
======

+----------+-----------------------------------------------------------------------------------+
| Syntax | FEX\_M file :sup:`\*`\ [,{file\ :sup:`x` \| #ch\ :sup:`x`\ }]\ :sup:`\*` [;cmd$] |
+----------+-----------------------------------------------------------------------------------+
| Location | SMSQ/E |
+----------+-----------------------------------------------------------------------------------+

Variant of the :ref:`fex` function that executes the given file and returns the new
job ID. Differently to :ref:`fex`, which starts the new job as owned by the system,
FEX\_M starts the job as a job owned by its parent job. This means that the
newly started job will be killed whenever its owner job is killed.

**Example**

::

jobid = FEX\_M(win1_qmac)

Will execute Qmac as a job owned by the current S*BASIC interpreter. When the
current interpreter ceases to exist, the new Qmac job will also be killed.

**NOTE**

An exhaustive explanation of the possible options can be found with the
description of :ref:`ex`. FEX\_M takes the exact same arguments.

**CROSS-REFERENCE**

See :ref:`ex`.

35 changes: 35 additions & 0 deletions sphinx/source/F/fex.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
.. _fex:

FEX
===

+----------+-------------------------------------------------------------------+
| Syntax | FEX(file :sup:`*`\ [,{filex | #chx}]\ :sup:`*` [;cmd$]) |
+----------+-------------------------------------------------------------------+
| Location | SMSQ/E |
+----------+-------------------------------------------------------------------+

Executes and returns the job ID of the job filename.
This function is a functional version of :ref:`ex`, with the same set of arguments,
that executes a job. In addition to what :ref:`ex` does, it returns the job ID of the
new job that was started.

**Example**

::

jId = FEX ("win1_XChange_xchange")

Will start Psion XChange in win1_xchange and return the job ID of the new job.

**NOTES**
In some combinations of SMSQ/E and FileInfo2 versions, there might be a clash of
extension names between FEX supplied as an SMSQ/E function (as described here)
and a function with the same name (but very different purpose) supplied by
FileInfo2. Later versions of FileInfo2 resolved this name clash by renaming the
corresponding function to EXF.

**CROSS-REFERENCE**

See :ref:`ex`, :ref:`fet`, :ref:`few`, :ref:`exec`, :ref:`jobs`.

4 changes: 4 additions & 0 deletions sphinx/source/F/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ Keywords F
fdec-dlr.rst
fetch-bytes.rst
fexp-dlr.rst
fet.rst
few.rst
fex.rst
fex-m.rst
ff.rst
fget-pct.rst
fget-dlr.rst
Expand Down
36 changes: 36 additions & 0 deletions sphinx/source/FrontMatter/Toolkits.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1524,6 +1524,7 @@ SMSQ/E provides the following commands:
* :ref:`cd-trackstart`
* :ref:`cd-tracktime`
* :ref:`chk-heap`
* :ref:`day-pct`
* :ref:`dev-usen`
* :ref:`disp-inverse`
* :ref:`disp-size`
Expand All @@ -1532,18 +1533,25 @@ SMSQ/E provides the following commands:
* :ref:`dos-drive`
* :ref:`dos-drive-dlr`
* :ref:`dos-use`
* :ref:`fet`
* :ref:`few`
* :ref:`fex`
* :ref:`fex-m`
* :ref:`flp-density`
* :ref:`flp-drive`
* :ref:`flp-drive-dlr`
* :ref:`flp-sec`
* :ref:`flp-step`
* :ref:`flp-use`
* :ref:`hget`
* :ref:`hot-getstuff-dlr`
* :ref:`hput`
* :ref:`jobid`
* :ref:`lget`
* :ref:`lput`
* :ref:`machine`
* :ref:`midinet`
* :ref:`month-pct`
* :ref:`mnet`
* :ref:`mnet-off`
* :ref:`mnet-on`
Expand Down Expand Up @@ -1611,6 +1619,7 @@ SMSQ/E provides the following commands:
* :ref:`snet-s-pct`
* :ref:`snet-use`
* :ref:`th-fix`
* :ref:`weekday-pct`
* :ref:`wget`
* :ref:`when--condition`
* :ref:`win-drive`
Expand All @@ -1622,6 +1631,7 @@ SMSQ/E provides the following commands:
* :ref:`win-use`
* :ref:`win-wp`
* :ref:`wput`
* :ref:`year-pct`


SMSQ/E - v2.50 Onwards
Expand Down Expand Up @@ -1683,6 +1693,32 @@ This version provided the following additional command(s):
* :ref:`palette-ql`


SMSQ/E - v3.00 Onwards
~~~~~~~~~~~~~~~~~~~~~~
This version provided the following additional command(s):

* :ref:`wm-block`
* :ref:`wm-border`
* :ref:`wm-ink`
* :ref:`wm-paper`
* :ref:`wm-strip`


SMSQ/E - v3.01 Onwards
~~~~~~~~~~~~~~~~~~~~~~
This version provided the following additional command(s):

* :ref:`wm-movemode`


SMSQ/E - v3.12 Onwards
~~~~~~~~~~~~~~~~~~~~~~
This version provided the following additional command(s):

* :ref:`pe-bgoff`
* :ref:`pe-bgon`


SMSQ/E - v2.73 for Atari
~~~~~~~~~~~~~~~~~~~~~~~~
Additional command(s) in this version of SMSQ/E are:
Expand Down
29 changes: 29 additions & 0 deletions sphinx/source/H/hot_getstuff-dlr.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
.. _hot_getstuff-dlr:

HOT_GETSTUFF$
=============

+----------+-------------------------------------------------------------------+
| Syntax | HOT_GETSTUFF$ [index] |
+----------+-------------------------------------------------------------------+
| Location | SMSQ/E |
+----------+-------------------------------------------------------------------+

This function returns the contents of the hotkey stuffer buffer. If given a
parameter of 0, or no parameter, it will return the current contents of the
stuffer buffer (like ALT-SPACE). A parameter of -1 gets the previous contents,
like ALT-SHIFT-SPACE

**Examples**

::

result = HOT_GETSTUFF$ : REMark Return current contents of stuffer buffer
result = HOT_GETSTUFF$(0) : REMark Return current contents of stuffer buffer
result = HOT_GETSTUFF$(-1) : REMark Return previous contents of stuffer buffer


**CROSS-REFERENCE**

See :ref:`get_stuff-dlr`, :ref:`hot_stuff`.

1 change: 1 addition & 0 deletions sphinx/source/H/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Keywords H
hot-chp1.rst
hot-cmd.rst
hot-do.rst
hot_getstuff-dlr.rst
hot-go.rst
hot-key.rst
hot-list.rst
Expand Down
1 change: 1 addition & 0 deletions sphinx/source/J/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Keywords J

jbase.rst
jobcbs.rst
jobid.rst
jobs.rst
job-dlr.rst
job-name.rst
Expand Down
29 changes: 29 additions & 0 deletions sphinx/source/J/jobid.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
.. _jobid:

JOBID
=====

+----------+-------------------------------------------------------------------+
| Syntax | JOBID [({nr, tag} | <name>)] |
+----------+-------------------------------------------------------------------+
| Location | SMSQ/E |
+----------+-------------------------------------------------------------------+

This function returns the 32-bit job id of the job with the given details as a
decimal value. The optional parameters may be either a job number and job tag
(as displayed by the JOBS command), or the job name. If no parameters are
supplied, the Job ID number of the current job is returned.

**Examples**

::

result = JOBID :REMark Returns the job ID of the current job
result = JOBID(job_name$) :REMark Returns the job ID of the job specified in job_name$
result = JOBID$(nr, tag) :REMark Returns the job ID of the job specified by nr and tag


**CROSS-REFERENCE**

See :ref:`jobs`, :ref:`job-pct`.

1 change: 1 addition & 0 deletions sphinx/source/M/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ Keywords M
mnet-use.rst
mod.rst
mode.rst
month-pct.rst
more.rst
mouse-speed.rst
mouse-stuff.rst
Expand Down
34 changes: 34 additions & 0 deletions sphinx/source/M/month-pct.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
.. _month-pct:

MONTH%
======

+----------+-------------------------------------------------------------------+
| Syntax | MONTH% [datestamp] |
+----------+-------------------------------------------------------------------+
| Location | SMSQ/E |
+----------+-------------------------------------------------------------------+

This function complements the :ref:`date` and :ref:`date-dlr` functions, by returning the month
number corresponding to the given datestamp, or current date, if no datestamp
was given.

**Examples**

::

PRINT MONTH% (0)

will print the month part of the QL's epoch, 1 for January

::

PRINT MONTH%

will print the current month number, (1...12, starting with January).


**CROSS-REFERENCE**

See :ref:`date`, :ref:`year-pct`.

0 comments on commit fa51bcb

Please sign in to comment.