diff options
author | Daniel Santos <dacs.git@brilhante.top> | 2022-03-13 22:44:15 +0000 |
---|---|---|
committer | Daniel Santos <dacs.git@brilhante.top> | 2022-03-13 22:44:15 +0000 |
commit | 78d5b4d899158534acb85cfe85d791c41d91bdd5 (patch) | |
tree | f73d9e487433fa549d15746fa6e3034e0a49d7ed | |
parent | 428eecbdcb68543adacf8d091f6c0793db91d61e (diff) | |
download | numericx-c-78d5b4d899158534acb85cfe85d791c41d91bdd5.tar.gz |
update README.md
* correct mispellings and make the text more understandable Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
-rw-r--r-- | README.md | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/README.md b/README.md index 7dce8f3..01249e1 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Numericx -A console program that converts a number (or text) from one numerical system into another different numerical system +A console program that converts a number (or text) from one numerical system into another different numerical system. ## Compiling @@ -10,14 +10,14 @@ For example, you may want to convert a hexadecimal number into a ternary number. You first need to define the proprieties of the numerical systems. These proprieties are defined in the compilation process (as compilation flags). -For example, let's make the hexdecimal numerical system with numerals from 0-f, with a infinite 0 and it start counting on 1. So, our hexadecimal system will need the following compilation flags: +For example, let's make the hexdecimal numerical system with numerals from `0-f`, with a infinite 0 and it start counting on 1. So, our hexadecimal system will need the following compilation flags: ``` -DFROM_NUMERICALS=\"0123456789abcdef\" -DFROM_FIRST_NUMBER_VOID -DFROM_INFINITE_BASE ``` if you want the units place of this numerical system to be on the right side, add `-DFROM_UNITS_ON_THE_END`. -Now, for the ternary system let's make with numerals from 1-3, 1 is not infinte and it start counting on 1. Use this flags: +Now, for the ternary system let's make with numerals from `1-3`, 1 is not infinite and it start counting on 1. Use this flags: ``` -DTO_NUMERICALS=\"123\" ``` @@ -26,25 +26,25 @@ if you want the units place of this numerical system to be on the right side, us Now, to create the executable to translate a number for these two numerical system, join all of this together and compile using this: ``` -c99 -DFROM_NUMERICALS=\"0123456789abcdef\" -DFROM_FIRST_NUMBER_VOID -DFROM_INFINITE_BASE -DFROM_UNITS_ON_THE_END -DTO_NUMERICALS=\"123\" -DTO_UNITS_ON_THE_END numericx.c -o hex-to-ternary +$ c99 -DFROM_NUMERICALS=\"0123456789abcdef\" -DFROM_FIRST_NUMBER_VOID -DFROM_INFINITE_BASE -DFROM_UNITS_ON_THE_END -DTO_NUMERICALS=\"123\" -DTO_UNITS_ON_THE_END numericx.c -o hex-to-ternary ``` -This creates the `hex-to-ternary` executable with can be used to convert numbers from hexadecimal to ternary. +This creates the `hex-to-ternary` executable with can be used to convert numbers from hexadecimal to ternary! ## Pre-defined executable compilation -There are many pre-defined compilation of executables on the Makefile. That a look at the Makefile to know them. +There are many pre-defined compilation of executables on the Makefile. Take a look at the Makefile to know them. Or you can run `make` to get all of the pre-defined executables. `make clean` to delete them. ## Compilation flags meanings -There are two categories for the compilation flags: the FROM category and the TO category. +There are two categories for the compilation flags: the `FROM` category and the `TO` category. -FROM flags are the numerical system definitions of the argument number. +`FROM` flags are the numerical system definitions of the argument number. -TO flags are the numerical system definitions of the number result. +`TO` flags are the numerical system definitions of the number result. -Below, are the meanings of the FROM flags. To use the TO flags, just switch `FROM_` to `TO_`. +Below, are the meanings of the `FROM` flags. The `TO` flags are the same as the `FROM` flags, with a switch of the `FROM_` to a `TO_`. |Flag|Meaning| |---|---| |