Class SysEdit
Editing Routines
Link to GitHub: Source File.
- Author:
- Simula Standard, S-Port: The Environment Interface, Øystein Myhre Andersen
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final charUnicode minus sign. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static StringUtility method addPlussExponent.static voidptgadr2()Put general addressstatic voidptoadr2()Put object addressstatic voidptpadr2()Put program addressstatic voidptradr2()Put routine addressstatic voidptaadr2()Put relative attribute addressstatic voidputfix()Put fix point reakprivate static Stringputfix(double r, int n) Utility method putfix.private static Stringputfix(float r, int n) Utility method putfix.static voidputfix2()Put fix point realstatic voidputfrac()Put grouped itemprivate static Stringputfrac(int val, int n) Utility method putfrac.static voidputhex()Put hexadecimal integer itemstatic voidputint()Put integer itemstatic voidputint2()Put integer itemstatic voidputlfix()Put fix point long realstatic voidputlfix2()Put fix point long realstatic voidputlreal()Put long real itemstatic voidPut long real itemstatic voidputreal()Put real itemprivate static Stringputreal(double r, int n) Utility method putreal.private static Stringputreal(float r, int n) Utility method putreal.static voidputreal2()Put real itemstatic voidputsize()Put size itemstatic voidputstr()Put string
-
Field Details
-
UNICODE_MINUS_SIGN
private static final char UNICODE_MINUS_SIGNUnicode minus sign. See: https://en.wikipedia.org/wiki/Plus_and_minus_signs- See Also:
-
-
Constructor Details
-
SysEdit
public SysEdit()Default Constructor
-
-
Method Details
-
putint
public static void putint()Put integer item
Visible sysroutine("PUTINT") PUTINT; import infix (string) item; integer val: end; Runtime Stack ..., item'addr, item'nchr, val → ...The value of the parameter 'val' is converted to an INTEGER ITEM which designates an integer equal to that value and moved into the given String 'item'.
If the string is too short to contain the numeric item then this will be signaled through the global variable 'status'.
-
putint2
public static void putint2()Put integer item
Visible sysroutine("PUTINT2") PUTINT2; import infix (string) item; integer val export integer lng; end; Runtime Stack ..., item'addr, item'nchr, val → ..., lngThe value of the parameter 'val' is converted to an INTEGER ITEM which designates an integer equal to that value and moved into the given String 'item'.
If the string is too short to contain the numeric item then error.
The length of the INTEGER ITEM is pushed onto the Runtime stack.
-
putfrac
public static void putfrac()Put grouped item
Visible sysroutine("PTFRAC") PTFRAC; import infix (string) item; integer val, n; end; Runtime Stack ..., item'addr, item'nchr, val, n → ...The value of the parameter 'val' is converted to a GROUPED ITEM which is moved into the given String 'item'.
The resulting numeric item is a GROUPED ITEM with no DECIMAL MARK if n<=0, and with a DECIMAL MARK followed by total of n digits if n>0.
Each digit group consists of 3 digits, except possibly the first one, and possibly the last one following a DECIMAL MARK.
The resulting GROUPED ITEM is moved into the given String 'item'.
If the string is too short to contain the numeric item then this will be signaled through the global variable 'status'.
-
putreal
public static void putreal()Put real item
Visible sysroutine("PTREAL") PTREAL; import infix (string) item; real val; integer frac; end; Runtime Stack ..., item'addr, item'nchr, val, frac → ...The resulting numeric item is a REAL ITEM containing an EXPONENT with a fixed implementation-defined number of characters. The EXPONENT is preceded by a SIGN PART if n=0, or by an INTEGER ITEM with one digit if n=1, or if n>1, by a DECIMAL ITEM with an INTEGER ITEM of 1 digit only, and a fraction of n-1 digits.
If n<0 a runtime error is caused.
The resulting REAL ITEM is moved into the given String 'item'.
If the string is too short to contain the numeric item then this will be signaled through the global variable 'status'.
-
putreal2
public static void putreal2()Put real item
Visible sysroutine("PTREAL2") PTREAL2; import infix (string) item; integer val; integer frac; export integer lng; end; Runtime Stack ..., item'addr, item'nchr, val, frac → ..., lngThe resulting numeric item is a REAL ITEM containing an EXPONENT with a fixed implementation-defined number of characters. The EXPONENT is preceded by a SIGN PART if n=0, or by an INTEGER ITEM with one digit if n=1, or if n>1, by a DECIMAL ITEM with an INTEGER ITEM of 1 digit only, and a fraction of n-1 digits.
If n<0 a runtime error is caused.
If the string is too short to contain the numeric item then this will be signaled through the global variable 'status'.
The length of the REAL ITEM is pushed onto the Runtime stack.
-
putlreal
public static void putlreal()Put long real item
Visible sysroutine("PLREAL") PLREAL; import infix (string) item; real val; integer frac; end; Runtime Stack ..., item'addr, item'nchr, val, frac → ...The resulting numeric item is a REAL ITEM containing an EXPONENT with a fixed implementation-defined number of characters. The EXPONENT is preceded by a SIGN PART if n=0, or by an INTEGER ITEM with one digit if n=1, or if n>1, by a DECIMAL ITEM with an INTEGER ITEM of 1 digit only, and a fraction of n-1 digits.
If n<0 a runtime error is caused.
The resulting REAL ITEM is moved into the given String 'item'.
If the string is too short to contain the numeric item then this will be signaled through the global variable 'status'.
-
putlreal2
public static void putlreal2()Put long real item
Visible sysroutine("PLREAL2") PLREAL2; import infix (string) item; integer val; integer frac; export integer lng; end; Runtime Stack ..., item'addr, item'nchr, val, frac → ..., lngThe resulting numeric item is a REAL ITEM containing an EXPONENT with a fixed implementation-defined number of characters. The EXPONENT is preceded by a SIGN PART if n=0, or by an INTEGER ITEM with one digit if n=1, or if n>1, by a DECIMAL ITEM with an INTEGER ITEM of 1 digit only, and a fraction of n-1 digits.
If n<0 a runtime error is caused.
If the string is too short to contain the numeric item then this will be signaled through the global variable 'status'.
The length of the REAL ITEM is pushed onto the Runtime stack.
-
putfix
public static void putfix()Put fix point reak
Visible sysroutine("PUTFIX") PUTFIX; import infix (string) item; real val; integer frac; end; Runtime Stack ..., item'addr, item'nchr, val, frac → ...The resulting numeric item is an INTEGER ITEM if n=0 or a DECIMAL ITEM with a FRACTION of n digits if n>0. It designates a number equal to the value of r or an approximation to the value of r, correctly rounded to n decimal places.
If n<0 a runtime error is caused.
The resulting ITEM is moved into the given String 'item'.
If the string is too short to contain the numeric item then this will be signaled through the global variable 'status'.
-
putfix2
public static void putfix2()Put fix point real
Visible sysroutine("PUTFIX2") PUTFIX2; import infix (string) item; real val; integer frac; export integer lng; end; Runtime Stack ..., item'addr, item'nchr, val, frac → ..., lngThe resulting numeric item is an INTEGER ITEM if n=0 or a DECIMAL ITEM with a FRACTION of n digits if n>0. It designates a number equal to the value of r or an approximation to the value of r, correctly rounded to n decimal places.
If n<0 a runtime error is caused.
If the string is too short to contain the numeric item then this will be signaled through the global variable 'status'.
The length of the ITEM is pushed onto the Runtime stack.
-
putlfix
public static void putlfix()Put fix point long real
Visible sysroutine("PTLFIX") PTLFIX; import infix (string) item; real val; integer frac; end; Runtime Stack ..., item'addr, item'nchr, val, frac → ...The resulting numeric item is an INTEGER ITEM if n=0 or a DECIMAL ITEM with a FRACTION of n digits if n>0. It designates a number equal to the value of r or an approximation to the value of r, correctly rounded to n decimal places.
If n<0 a runtime error is caused.
The resulting ITEM is moved into the given String 'item'.
If the string is too short to contain the numeric item then this will be signaled through the global variable 'status'.
-
putlfix2
public static void putlfix2()Put fix point long real
Visible sysroutine("PTLFIX2") PTLFIX2; import infix (string) item; real val; integer frac; export integer lng; end; Runtime Stack ..., item'addr, item'nchr, val, frac → ..., lngThe resulting numeric item is an INTEGER ITEM if n=0 or a DECIMAL ITEM with a FRACTION of n digits if n>0. It designates a number equal to the value of r or an approximation to the value of r, correctly rounded to n decimal places.
If n<0 a runtime error is caused.
If the string is too short to contain the numeric item then this will be signaled through the global variable 'status'.
The length of the ITEM is pushed onto the Runtime stack.
-
puthex
public static void puthex()Put hexadecimal integer item
Visible sysroutine("PUTHEX") PUTHEX; import infix (string) item; int val; export integer lng; end; Runtime Stack ..., item'addr, item'nchr, val → ..., lngThe value of the parameter 'val' is converted to an HEX ITEM and moved into the given String 'item'.
If the string is too short to contain the numeric item then error.
The length of the ITEM is pushed onto the Runtime stack.
-
putsize
public static void putsize()Put size item
Visible sysroutine("PUTSIZE") PUTSIZE; import infix (string) item; size val; export integer lng; end; Runtime Stack ..., item'addr, item'nchr, val → ..., lngThe value of the parameter 'val' is converted to an SIZE ITEM and moved into the given String 'item'.
If the string is too short to contain the numeric item then error.
The length of the ITEM is pushed onto the Runtime stack.
-
putstr
public static void putstr()Put string
Visible sysroutine("PUTSTR") PUTSTR; import infix (string) item; size val; export integer lng; end; Runtime Stack ..., item'addr, item'nchr, val → ..., lngThe value of the parameter 'val' is moved into the given String 'item'.
If the string is too short to contain the numeric item then error.
The length of the String 'val' is pushed onto the Runtime stack.
-
ptoadr2
public static void ptoadr2()Put object address
Visible sysroutine("PTOADR2") PTOADR2; import infix (string) item; ref() val; export integer lng; end; Runtime Stack ..., item'addr, item'nchr, val → ..., lngThe value of the parameter 'val' is converted to an OADDR ITEM and moved into the given String 'item'.
If the string is too short to contain the numeric item then error.
The length of the ITEM is pushed onto the Runtime stack.
-
ptpadr2
public static void ptpadr2()Put program address
Visible sysroutine("PTPADR2") PTPADR2; import infix (string) item; label val; export integer lng; end; Runtime Stack ..., item'addr, item'nchr, val → ..., lngThe value of the parameter 'val' is converted to an PADDR ITEM and moved into the given String 'item'.
If the string is too short to contain the numeric item then error.
The length of the ITEM is pushed onto the Runtime stack.
-
ptradr2
public static void ptradr2()Put routine address
Visible sysroutine("PTRADR2") PTRADR2; import infix (string) item; entry() val; export integer lng; end; Runtime Stack ..., item'addr, item'nchr, val → ..., lngThe value of the parameter 'val' is converted to an RADDR ITEM and moved into the given String 'item'.
If the string is too short to contain the numeric item then error.
The length of the ITEM is pushed onto the Runtime stack.
-
ptaadr2
public static void ptaadr2()Put relative attribute address
Visible sysroutine("PTAADR2") PTAADR2; import infix (string) item; entry() val; export integer lng; end; Runtime Stack ..., item'addr, item'nchr, val → ..., lngThe value of the parameter 'val' is converted to an AADDR ITEM and moved into the given String 'item'.
If the string is too short to contain the numeric item then error.
The length of the ITEM is pushed onto the Runtime stack.
-
ptgadr2
public static void ptgadr2()Put general address
Visible sysroutine("PTGADR2") PTGADR2; import infix (string) item; name() val; export integer lng; end; Runtime Stack ..., item'addr, item'nchr, val'addr, val'ofst → ..., lngThe value of the parameter 'val' is converted to an GADDR ITEM and moved into the given String 'item'.
If the string is too short to contain the numeric item then error.
The length of the ITEM is pushed onto the Runtime stack.
-
putfix
Utility method putfix.
The resulting numeric item is an INTEGER ITEM if n=0 or a DECIMAL ITEM with a FRACTION of n digits if n>0. It designates a number equal to the value of r or an approximation to the value of r, correctly rounded to n decimal places. If n<0, a run-time error is caused.
- Parameters:
r- the long real value to be editedn- the number of digits after decimal sign- Returns:
- the edited value
-
putfix
Utility method putfix.
The resulting numeric item is an INTEGER ITEM if n=0 or a DECIMAL ITEM with a FRACTION of n digits if n>0. It designates a number equal to the value of r or an approximation to the value of r, correctly rounded to n decimal places. If n<0, a run-time error is caused.
- Parameters:
r- the real value to be editedn- the number of digits after decimal sign- Returns:
- the edited value
-
putreal
Utility method putreal.
The resulting numeric item is a REAL ITEM containing an EXPONENT with a fixed implementation-defined number of characters. The EXPONENT is preceded by a SIGN PART if n=0, or by an INTEGER ITEM with one digit if n=1, or if n>1, by a DECIMAL ITEM with an INTEGER ITEM of 1 digit only, and a fraction of n-1 digits. If n<0 a runtime error is caused.
- Parameters:
r- the long real value to be editedn- the number of digits after decimal sign- Returns:
- the edited value
-
putreal
Utility method putreal.
The resulting numeric item is a REAL ITEM containing an EXPONENT with a fixed implementation-defined number of characters. The EXPONENT is preceded by a SIGN PART if n=0, or by an INTEGER ITEM with one digit if n=1, or if n>1, by a DECIMAL ITEM with an INTEGER ITEM of 1 digit only, and a fraction of n-1 digits. If n<0 a runtime error is caused.
- Parameters:
r- the real value to be editedn- the number of digits after decimal sign- Returns:
- the edited value
-
putfrac
Utility method putfrac.
The resulting numeric item is a GROUPED ITEM with no DECIMAL MARK if n<=0, and with a DECIMAL MARK followed by total of n digits if n>0.
Each digit group consists of 3 digits, except possibly the first one, and possibly the last one following a DECIMAL MARK.
- Parameters:
val- an integer valuen- number of digits after a decimal mark- Returns:
- the edited value
-
addPlussExponent
-