How to resolve the algorithm Idiomatically determine all the lowercase and uppercase letters step by step in the Action! programming language
Published on 12 May 2024 09:40 PM
How to resolve the algorithm Idiomatically determine all the lowercase and uppercase letters step by step in the Action! programming language
Table of Contents
Problem Statement
Idiomatically determine all the lowercase and uppercase letters (of the Latin [English] alphabet) being used currently by a computer programming language. The method should find the letters regardless of the hardware architecture that is being used (ASCII, EBCDIC, or other).
Display the set of all: that can be used (allowed) by the computer program, where letter is a member of the Latin (English) alphabet: a ──► z and A ──► Z.
You may want to mention what hardware architecture is being used, and if applicable, the operating system.
Let's start with the solution:
Step by Step solution about How to resolve the algorithm Idiomatically determine all the lowercase and uppercase letters step by step in the Action! programming language
Source code in the action! programming language
INCLUDE "D2:CHARTEST.ACT" ;from the Action! Tool Kit
PROC Main()
CHAR ARRAY lower(128),upper(128)
CHAR c
BYTE lowerLen,upperLen
Put(125) PutE() ;clear screen
lowerLen=0
upperLen=0
FOR c=0 TO 127
DO
IF IsLower(c) THEN
lowerLen==+1
lower(lowerLen)=c
ELSEIF IsUpper(c) THEN
upperLen==+1
upper(upperLen)=c
FI
OD
lower(0)=lowerLen
upper(0)=upperLen
PrintF("lowercase letters:%E %S%E%E",lower)
PrintF("uppercase letters:%E %S",upper)
RETURN
You may also check:How to resolve the algorithm Draw a cuboid step by step in the Sidef programming language
You may also check:How to resolve the algorithm Sorting algorithms/Counting sort step by step in the ALGOL 68 programming language
You may also check:How to resolve the algorithm Vigenère cipher/Cryptanalysis step by step in the Raku programming language
You may also check:How to resolve the algorithm Primality by trial division step by step in the Clojure programming language
You may also check:How to resolve the algorithm Non-decimal radices/Input step by step in the XPL0 programming language