Let's take a look at the OS/2 Calculators.
https://www.os2world.com/wiki/index.php/Category:Calculators
-3. The IBM WIN-OS/2 Calculator we've got is missing. Including this (non-OS/2) OS calculator is arbitrary: x:\OS2\MDOS\WINOS2\CALC.EXE
-2. There may be at least 4 categories, excluding verifying tools and fixed input: CLI, PM, RPM and specialized, unit converters with variable user input (i.e. no ASCII tables).
-1. One of the calculators was renamed later.
0. @Martin, you may have missed it: what is you CONFIG.SYS' TZ setting (for a possible generic Beat/2-clock fix or work-around)?
1. The OS calculator is missing. YMMV, but mine's: x:\ECS\BIN\ECSCALC.EXE
2. "Calculator" (title bar's name) is missing. An executable called CALC.EXE, a CALC.ICO, and 3 VX-REXX source files.
3. Calcus is missing.
4. CCALC (CCALC.EXE) appears be missing.
5. DECalc is missing. You should mention its sticking BIN/DEC/HEX/OCT setting, so programmers can calculate 9*6 without having to think about that.
6. ehm is missing (Qt-based).
7. HPcalc is missing.
8. KeyCalc is missing.
9. PMCalc (IBM EWS?) is missing.
A. PMDCalc appears to be missing.
B. PMReXX Calculator is missing.
C. QEasyCalc is missing (Qt-based).
D. RPCALC is missing.
E. WarpCalc is missing.
F. Nameless Rexx one-liner. Untested usage sample: RR.CMD Date('B') / ( Words('Two words)') * 7 ) + 3
/**/;ARG x;INTERPRET SAY x;EXIT
Longer, CLI, known as RC.CMD:
/* REXX Calculator */
/* (c) Torus Brokers 1996 */
SIGNAL ON Error
SIGNAL ON Halt
PARSE ARG calculation
IF LoadRexxUtil() THEN EXIT
CALL SysCls
SAY
SAY
IF calculation='' | calculation='/?' | calculation='-?' THEN DO
SAY 'The REXX Calculator can be used to perform simple calculations.'
SAY 'Standard REXX functions for calculations are also valid.'
CALL Explain
EXIT
END
IF Left(calculation,1)='"' THEN DO
PARSE VAR calculation '"' calculation '"' sum
END
INTERPRET resultc '=' calculation
IF DATATYPE(resultc,N)=0 THEN DO
SAY 'The result of the given calculation is not a valid number.'
CALL Explain
EXIT
END
SAY '==================='
SAY '= REXX Calculator ='
SAY '==================='
SAY
SAY calculation '=' resultc
SAY
EXIT
LoadRexxUtil: PROCEDURE
IF RxFuncQuery('SysLoadFuncs') THEN DO
IF RxFuncAdd('SysLoadFuncs','RexxUtil','SysLoadFuncs') THEN DO
SAY
SAY
SAY 'The RexxUtil library (REXXUTIL.DLL), part of OS/2, cannot be'
SAY 'loaded. Possible reasons may be :'
SAY
SAY ' - REXXUTIL.DLL does not exist in the LIBPATH'
SAY ' - REXXUTIL.DLL is not installed'
SAY ' - Not enough memory available'
SAY
SAY 'The program processed nothing.'
SAY
RETURN 1
END
CALL SysLoadFuncs
END
RETURN 0
Explain: PROCEDURE
SAY
SAY ' Syntax :'
SAY
SAY ' RC <calculation>'
SAY
SAY 'Where <calculation> represents a valid calculation. Examples :'
SAY
SAY ' RC 4E3/100 --> 40'
SAY ' RC (8/2)-5 --> -1'
SAY ' RC "1|1" --> 1'
SAY ' RC 2+3-5 --> 0'
SAY
RETURN 0
Error:
Halt:
SAY
SAY 'The result of the given calculation cannot be calculated.'
CALL Explain
EXIT
Same, longer, dual-mode (PM UI requires installer and fixed or non-broken PMREXX.EXE), known as PMRC.CMD:
/* PM REXX Calculator */
/* (c) Torus Brokers 1996 */
SIGNAL ON Error
SIGNAL ON Halt
PARSE ARG calculation
IF LoadRexxUtil() THEN EXIT
IF Address()<>'PMREXX' THEN DO
CALL SysCls
SAY
SAY
SAY 'PMRC.CMD is the OS/2 PM version of RC.CMD. PMINSTAL.CMD can be'
SAY 'used to create a program Object on the OS/2 PM. This will start'
SAY 'PMRC with all required parameters. PMRC.CMD needs PMREXX.EXE'
SAY '(part of OS/2), which should exist in your PATH or in the'
SAY 'current directory.'
SAY
SAY ' Syntax for use with PMREXX :'
SAY
SAY ' PMREXX PMRC.CMD <calculation>'
SAY
EXIT
END
title='PM REXX Calculator'
IF calculation='' | calculation='/?' | calculation='-?' THEN DO
enter='0A'x
explain1='This program can be used to perform simple '
explain2='calculations. Standard REXX functions for calculations '
explain3='are also valid.'||enter||enter
explain4='Examples of valid calculations are :'||enter
explain5=enter||'4E3/100 (8/2)-5 "1|1" 2+3-5'||enter||enter
explain6='The results are, respectively, 40, -1, 1 and 0.'
explain7=enter||enter||'The result of the calculation is displayed in the format '
explain8="<calculation> = <result>. A '='-sign at the end of the given "
explain9='calculation may not be used, because the program already performs'
explain10=' this action by itself.'
explain11=explain1||explain2||explain3||explain4||explain5
explain12=explain6||explain7||explain8||explain9||explain10
explain=explain11||explain12
rc=RxMessageBox(explain,title,'OK','INFORMATION')
EXIT
END
IF Left(calculation,1)='"' THEN DO
PARSE VAR calculation '"' calculation '"' sum
END
INTERPRET resultc '=' calculation
IF DATATYPE(resultc,N)=0 THEN DO
error='The result of the given calculation is not a valid number.'
rc=RxMessageBox(error,title,'OK','ERROR')
EXIT
END
rc=RxMessageBox(calculation '=' resultc,title,'OK','INFORMATION')
EXIT
LoadRexxUtil: PROCEDURE
IF RxFuncQuery('SysLoadFuncs') THEN DO
IF RxFuncAdd('SysLoadFuncs','RexxUtil','SysLoadFuncs') THEN DO
SAY
SAY
SAY 'The RexxUtil library (REXXUTIL.DLL), part of OS/2, cannot be'
SAY 'loaded. Possible reasons may be :'
SAY
SAY ' - REXXUTIL.DLL does not exist in the LIBPATH'
SAY ' - REXXUTIL.DLL is not installed'
SAY ' - Not enough memory available'
SAY
SAY 'The program processed nothing.'
SAY
RETURN 1
END
CALL SysLoadFuncs
END
RETURN 0
Error:
Halt:
title='PM REXX Calculator'
reason='The result of the given calculation cannot be calculated.'
rc=RxMessageBox(reason,title,'OK','ERROR')
EXIT
Installer of PMRC.CMD:
/* Creates a program Object for PMRC on the OS/2 PM */
/* (c) Torus Brokers 1996 */
SIGNAL ON Error
SIGNAL ON Halt
IF LoadRexxUtil() THEN EXIT
CALL SysCls
SAY
SAY
IF NotHere('CMD') THEN EXIT
IF NotHere('ICO') THEN EXIT
here=SysSearchPath('PATH','PMREXX.EXE')
IF here='' THEN DO
rc=SysFileTree('PMREXX.EXE','check','FO')
IF rc=2 THEN DO
SAY 'There is not enough available memory to query a list of files.'
SAY 'The installation has not been completed.'
SAY
EXIT
END
IF check.0=0 THEN DO
SAY 'PMREXX.EXE, part of OS/2, cannot be found in the PATH or in the'
SAY 'current directory. The installation has not been completed.'
EXIT
END
END
current=Directory()||'\PMRC.'
class='WPProgram'
title='PM REXX Calculator'
location='<WP_DESKTOP>'
setup1='EXENAME=PMREXX.EXE;ICONFILE='||current||'ICO;'
setup2='PARAMETERS='||current||'CMD'
setup3=' [Enter a calculation (Select Open for help)];'
setup=setup1||setup2||setup3
action='ReplaceIfExists'
rc=SysCreateObject(class,title,location,setup,action)
IF rc=0 THEN DO
SAY 'A program Object for PMRC.CMD could not be created on the OS/2 PM.'
SAY
SAY 'You can also run PMRC.CMD by using the OS/2 command-line. Syntax is :'
SAY
SAY ' PMREXX PMRC.CMD <calculation>'
SAY
SAY 'PMREXX(.EXE) is a part of OS/2; PMRC.CMD is the application which'
SAY 'will be runned by PMREXX; <calculation> is a calculation.'
SAY
EXIT
END
IF Address()='PMREXX' THEN DO
text='An Object for PMRC.CMD has been created on the OS/2 PM.'
rc=RxMessageBox(text,title,'OK','INFORMATION')
EXIT
END
SAY 'An Object for PMRC.CMD has been created on the OS/2 PM.'
SAY
EXIT
LoadRexxUtil: PROCEDURE
IF RxFuncQuery('SysLoadFuncs') THEN DO
IF RxFuncAdd('SysLoadFuncs','RexxUtil','SysLoadFuncs') THEN DO
SAY
SAY
SAY 'The RexxUtil library (REXXUTIL.DLL), part of OS/2, cannot be'
SAY 'loaded. Possible reasons may be :'
SAY
SAY ' - REXXUTIL.DLL does not exist in the LIBPATH'
SAY ' - REXXUTIL.DLL is not installed'
SAY ' - Not enough memory available'
SAY
SAY 'The program processed nothing.'
SAY
RETURN 1
END
CALL SysLoadFuncs
END
RETURN 0
NotHere: PROCEDURE
ARG extension
check=Directory()||'\PMRC.'||extension
rc=SysFileTree(check,'file','FO')
IF rc=2 THEN DO
SAY 'There is not enough available memory to query a list of files.'
SAY 'The installation has not been completed.'
SAY
RETURN 1
EXIT
END
IF file.0=0 THEN DO
SAY 'The file PMRC.'extensie' does not exist in the current Directory.'
SAY 'The installation has not been completed.'
SAY
RETURN 1
END
RETURN 0
Error:
Halt:
SAY 'The installation has not been completed.'
SAY
EXIT