How to resolve the algorithm Character codes step by step in the Frink programming language
Published on 12 May 2024 09:40 PM
How to resolve the algorithm Character codes step by step in the Frink programming language
Table of Contents
Problem Statement
Given a character value in your language, print its code (could be ASCII code, Unicode code, or whatever your language uses).
The character 'a' (lowercase letter A) has a code of 97 in ASCII (as well as Unicode, as ASCII forms the beginning of Unicode). Conversely, given a code, print out the corresponding character.
Let's start with the solution:
Step by Step solution about How to resolve the algorithm Character codes step by step in the Frink programming language
Source code in the frink programming language
println[char["a"]] // prints 97
println[chars["a"]] // prints [97] (an array)
println[char[97]] // prints a
println[char["Frink rules!"]] // prints [70, 114, 105, 110, 107, 32, 114, 117, 108, 101, 115, 33]
println[[70, 114, 105, 110, 107, 32, 114, 117, 108, 101, 115, 33]] // prints "Frink rules!"
You may also check:How to resolve the algorithm Random numbers step by step in the REXX programming language
You may also check:How to resolve the algorithm Decorate-sort-undecorate idiom step by step in the Factor programming language
You may also check:How to resolve the algorithm S-expressions step by step in the Ruby programming language
You may also check:How to resolve the algorithm Arrays step by step in the AArch64 Assembly programming language
You may also check:How to resolve the algorithm Haversine formula step by step in the QB64 programming language