- Rexx - Web Programming
- Rexx - Reginald
- Rexx - Graphical User Interface
- Rexx - Best Programming Practices
- Rexx - Performance
- Handheld & Embedded
- Rexx - Databases
- Rexx - Brexx
- Rexx - Netrexx
- Rexx - Implementations
- Rexx - Instructions
- Rexx - Extended Functions
- Rexx - Portability
- Rexx - Object Oriented
- Rexx - Error Handling
- Rexx - Debugging
- Rexx - Signals
- Rexx - Parsing
- Rexx - Regina
- Rexx - XML
- Rexx - System Commands
- Rexx - Built-In Functions
- Rexx - Subroutines
- Rexx - Functions For Files
- Rexx - File I/O
- Rexx - Stacks
- Rexx - Functions
- Rexx - Strings
- Rexx - Numbers
- Rexx - Decision Making
- Rexx - Loops
- Rexx - Arrays
- Rexx - Operators
- Rexx - Variables
- Rexx - Datatypes
- Rexx - Basic Syntax
- Rexx - Installation of Plugin-Ins
- Rexx - Installation
- Rexx - Environment
- Rexx - Overview
- Rexx - Home
Rexx Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Rexx - Best Programming Practices
Every programmer wants their program to be the best when it comes to quapty and efficiency. The following are some of the best programming practices or hints when writing Rexx programs which can help one achieve these goals.
Hint 1
Use the address command before you issue any command to the operating system or command prompt. This will help you get the address space beforehand in memory and cause your program to run more efficiently.
An example of the address command is shown below.
Example
/* Main program */ address system dir
The output of the command is as follows, but it could vary from system to system.
Volume in drive H is Apps Volume Serial Number is 8E66-AC3D Directory of H: 06/30/2016 01:28 AM <DIR> Apps 07/05/2016 03:40 AM 463 main.class 07/07/2016 01:30 AM 46 main.nrx 07/07/2016 01:42 AM 38 main.rexx 3 File(s) 547 bytes Dir(s) 313,085,173,760 bytes free
Hint 2
Ensure all commands to the operating system are in upper case and in quotes wherever possible.
An example for the same is shown below.
Example
/* Main program */ options arexx_bifs say chdir( REXXML100 ) say directory()
When we run the above program, we will get the following result.
0 D: exxxml100
Hint 3
Avoid creating big comment blocks as shown in the following program.
Example
/******/ /* */ /* */ /* */ /******/ /* Main program */ address system dir
Hint 4
Use the Parse statement to assign default values. An example for the same is shown below.
Example
parse value 0 1 with a, b
Hint 5
Use the "Left(var1,2)" statement wherever possible instead of the “substr(var1,1,2)" statement.
Hint 6
Use the "Right(var1,2)" statement wherever possible instead of the “substr(var1,length(var1),2)" statement.
Advertisements