diff --git a/02_MENT/Testat/build.sh b/02_MENT/Testat/build.sh index 7efe4e7..9cb70b2 100755 --- a/02_MENT/Testat/build.sh +++ b/02_MENT/Testat/build.sh @@ -2,9 +2,6 @@ rm *.out -clang++-6.0 -std=c++14 -I../helpers/ -o limits.out limits_println.cpp -clang++-6.0 -std=c++14 -I../helpers/ -o println.out printlnDemo.cpp - clang++-6.0 -std=c++14 main_02_MENT.cpp ./a.out diff --git a/02_MENT/a.out b/02_MENT/a.out deleted file mode 100755 index b8a6f54..0000000 Binary files a/02_MENT/a.out and /dev/null differ diff --git a/02_MENT/limits.out b/02_MENT/limits.out deleted file mode 100755 index 080e0a5..0000000 Binary files a/02_MENT/limits.out and /dev/null differ diff --git a/02_MENT/main_02_MENT.cpp b/02_MENT/main_02_MENT.cpp index 120d199..7e56780 100644 --- a/02_MENT/main_02_MENT.cpp +++ b/02_MENT/main_02_MENT.cpp @@ -10,6 +10,8 @@ struct PascalString{ char characters[256]; // chars of some character string }; +char cStringArea[1024]; + int hexDigitToInt(char hexDigit) { int value = 0; @@ -53,12 +55,12 @@ PascalString intToDual(int n) { char intToHexChar(int n) { if(n > 9) { switch(n) { - case 10: return 'A'; break; - case 11: return 'B'; break; - case 12: return 'C'; break; - case 13: return 'D'; break; - case 14: return 'E'; break; - case 15: return 'F'; break; + case 10: return 'A'; + case 11: return 'B'; + case 12: return 'C'; + case 13: return 'D'; + case 14: return 'E'; + case 15: return 'F'; default: return 'X'; } } @@ -83,13 +85,21 @@ PascalString bitwiseDualAnd(PascalString a, PascalString b) { PascalString result = {longString.length, '0'}; for(int i = longString.length; i >= 0; --i) { - if(shortString.characters[i] == '1' && longString.characters[i] == '1') result.characters[i] = '1'; - else result.characters[i] = '0'; + if(shortString.length < i) result.characters[i] = longString.characters[i]; + result.characters[i] = longString.characters[i] & shortString.characters[i]; } return result; } +PascalString bitwiseHexAnd(PascalString a, PascalString b) { + +} + +int to_c_string(PascalString s) { + +} + int main(int argc, char** argv, char** envp) { PascalString s = {3, '1', '0', '0'}; diff --git a/02_MENT/println.out b/02_MENT/println.out deleted file mode 100755 index 8c522bc..0000000 Binary files a/02_MENT/println.out and /dev/null differ