hey, eine andere Fehlermeldung

This commit is contained in:
Johannes Theiner 2018-04-09 21:19:20 +02:00
parent a3f4c78465
commit 37a116cf63
1 changed files with 70 additions and 74 deletions

View File

@ -56,22 +56,16 @@ PascalString intToDual(int n) {
char intToHexChar(int n) { char intToHexChar(int n) {
if(n > 9) { if(n > 9) {
switch(n) { switch(n) {
case 10: case 10: return 'A';
return 'A'; case 11: return 'B';
case 11: case 12: return 'C';
return 'B'; case 13: return 'D';
case 12: case 14: return 'E';
return 'C'; case 15: return 'F';
case 13: default: return 'X';
return 'D';
case 14:
return 'E';
case 15:
return 'F';
default:
return 'X';
} }
} else return n + '0'; }
else return n + '0';
} }
PascalString intToHex(int n) { PascalString intToHex(int n) {
@ -91,6 +85,7 @@ PascalString bitwiseDualAnd(PascalString a, PascalString b) {
for(int i = b.length; i >= 0; --i) { for(int i = b.length; i >= 0; --i) {
if(a.length < i) result.characters[i] = a.characters[i]; if(a.length < i) result.characters[i] = a.characters[i];
println("i: ", i, " ", a.characters[i] & b.characters[i]);
result.characters[i] = a.characters[i] & b.characters[i]; result.characters[i] = a.characters[i] & b.characters[i];
} }
@ -102,6 +97,7 @@ PascalString bitwiseHexAnd(PascalString a, PascalString b) {
for(int i = b.length; i >= 0; --i) { for(int i = b.length; i >= 0; --i) {
if(a.length < i) result.characters[i] = a.characters[i]; if(a.length < i) result.characters[i] = a.characters[i];
println("i: ", i, " ", a.characters[i] & b.characters[i]);
result.characters[i] = a.characters[i] & b.characters[i]; result.characters[i] = a.characters[i] & b.characters[i];
} }