JADE consists of a C++ include file with Defines/Macros, and a library of Functions that seeks to provide an easier way of creating C++ code.

Armando Rivera df91335142 Updated Keywords and Prototypes text files 9 months ago
Examples 6656d313fd Modified local include path 9 months ago
include 53004c5ded Added LPAD$, RPAD$, and PAD$ Functions. 9 months ago
.gitignore 32a02815db Added *.exe exclusion 9 months ago
KEYWORDS.txt df91335142 Updated Keywords and Prototypes text files 9 months ago
Makefile e6fed637d0 Updated Makefile 9 months ago
PROTOTYPES.txt df91335142 Updated Keywords and Prototypes text files 9 months ago
README.md 205edc05d5 Updated README 9 months ago
abort.cc fd785731d1 Modified path to local 'jade.hpp' header 9 months ago
asc.cc fd785731d1 Modified path to local 'jade.hpp' header 9 months ago
bin.cc 8db303537a Added BIN$, HEX$, and OCT$ functions 9 months ago
copyfile.cc fd785731d1 Modified path to local 'jade.hpp' header 9 months ago
enc.cc a7d28b34d5 Changed ENDFUNCTION to END in all files 9 months ago
endswith.cc 324c222338 Added new functions 'STARTS_WITH' and 'ENDS_WITH' for STRING 9 months ago
exists.cc fd785731d1 Modified path to local 'jade.hpp' header 9 months ago
extract.cc fd785731d1 Modified path to local 'jade.hpp' header 9 months ago
format.cc a7d28b34d5 Changed ENDFUNCTION to END in all files 9 months ago
generate-keywords.cpp 329fd45541 Added program to generate keywords/prototypes 9 months ago
grab.cc a7d28b34d5 Changed ENDFUNCTION to END in all files 9 months ago
hex.cc 8db303537a Added BIN$, HEX$, and OCT$ functions 9 months ago
instr.cc 2985e1403f Fixed off by one indexing 9 months ago
jade.hpp 0b7658a6d7 Added jade header file 9 months ago
lcase.cc a7d28b34d5 Changed ENDFUNCTION to END in all files 9 months ago
left.cc a7d28b34d5 Changed ENDFUNCTION to END in all files 9 months ago
loadfile.cc a7d28b34d5 Changed ENDFUNCTION to END in all files 9 months ago
lpad.cc 53004c5ded Added LPAD$, RPAD$, and PAD$ Functions. 9 months ago
ltrim.cc a7d28b34d5 Changed ENDFUNCTION to END in all files 9 months ago
mcase.cc a7d28b34d5 Changed ENDFUNCTION to END in all files 9 months ago
mid.cc 0a12f58169 Added guard if start parameter is zero 9 months ago
oct.cc 8db303537a Added BIN$, HEX$, and OCT$ functions 9 months ago
pad.cc 53004c5ded Added LPAD$, RPAD$, and PAD$ Functions. 9 months ago
print.cc fd785731d1 Modified path to local 'jade.hpp' header 9 months ago
regex.cc a7d28b34d5 Changed ENDFUNCTION to END in all files 9 months ago
remain.cc fd785731d1 Modified path to local 'jade.hpp' header 9 months ago
repeat.cc fd785731d1 Modified path to local 'jade.hpp' header 9 months ago
replace.cc a7d28b34d5 Changed ENDFUNCTION to END in all files 9 months ago
reverse.cc a7d28b34d5 Changed ENDFUNCTION to END in all files 9 months ago
right.cc a7d28b34d5 Changed ENDFUNCTION to END in all files 9 months ago
rpad.cc 53004c5ded Added LPAD$, RPAD$, and PAD$ Functions. 9 months ago
rtrim.cc a7d28b34d5 Changed ENDFUNCTION to END in all files 9 months ago
savefile.cc 9991c41ba0 Changed ENDSUB to END 9 months ago
split.cc a7d28b34d5 Changed ENDFUNCTION to END in all files 9 months ago
splitpath.cc a7d28b34d5 Changed ENDFUNCTION to END in all files 9 months ago
startswith.cc 324c222338 Added new functions 'STARTS_WITH' and 'ENDS_WITH' for STRING 9 months ago
tally.cc a7d28b34d5 Changed ENDFUNCTION to END in all files 9 months ago
trim.cc a7d28b34d5 Changed ENDFUNCTION to END in all files 9 months ago
ucase.cc a7d28b34d5 Changed ENDFUNCTION to END in all files 9 months ago
val.cc a7d28b34d5 Changed ENDFUNCTION to END in all files 9 months ago

README.md

JADE

(Jade's A Developing Experiment)

JADE consists of a C++ include file with Defines/Macros, and a library of Functions that seeks to provide an easier way of creating C++ code.

JADE is licensed under the MIT License.

This is a proof of concept using a BASIC-like syntax to program C++.

For the list of current Keywords, see the [Keywords]() file

For the Function prototypes, see the [Prototypes]() file

You can regenerate both files by compiling and running the included generate-keywords.cc file.

Building the Library

To build the library, a simple make in the source folder is all that is required.

To build the Examples, change directory to the Examples folder and type make.

How to link to the library

You have two choices:

  1. If you used the make install option, you can link to the library with -ljade
  2. The seccond approach requres you to pass the location of the jade.h and the libjade.a file to g++, like so:

g++ -std=c++11 -I<path to jade.h> -L<path to libjade> -ljade

Note: You MUST compile using -std=c++11 or higher.

What does coding with JADE look like?

#include <jade.hpp>

MAIN
    VAR MyArray = SPLIT("pear,cranberry,orange,apple,carrot,banana,grape,peaches,tangerines",",");

    SORT(MyArray);

    FOR (VAR item IN MyArray) DO 
        PRINT(item);
    END
END

Compile it with:

g++ -std=c++11 sorttest.cc -ljade -o sorttest

"What if I don't want to retype the entire g++ command every time I compile..."

For simple one-off compilation, I created a Bash Function that I added to my ~/.bash_profile (on my Mac) and ~/.bashrc (On my Linux box) that looks like this:

# JADE
function jade() { 
    g++ -std=c++11 "$@" -ljade -o "${1%.*}"
}

So I can invoke the compilation of the demo above like so:

jade sort_test.cc

NOTE: Any additional linker options need to be placed AFTER the primary filename, including any additional files or libraries.

Let me know if you have any questions/comments.

You can post your questions/comments at: JADE Sub-Forum on allbasic.info

Licence

Jade is licenced under the MIT License

Copyright 2016-2019 Armando I. Rivera

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.