Jump to content

Recommended Posts

Posted (edited)

I'm trying to initialize a large array in its declaration statement, but I'm running into a problem with a large number of elements. For instance, this works:

Const $avChars[150][12] = [[1,1,1,1,1,1,1,1,1,1,1,1], _; 0 {NUL}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 1 {SOH}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 2 {STX}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 3 {ETX}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 4 {EOT}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 5 {ENQ}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 6 {ACK}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 7 {BEL}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 8 {BS}
                           [0,0,0,0,0,0,1,1,0,0,1,0], _; 9 {HT}
                           [0,0,0,0,0,0,1,0,0,0,1,0], _; 10 {LF}
                           [0,0,0,0,0,0,1,0,0,0,1,0], _; 11 {VT}
                           [0,0,0,0,0,0,1,0,0,0,1,0], _; 12 {FF}
                           [0,0,0,0,0,0,1,0,0,0,1,0], _; 13 {CR}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 14 {SO}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 15 {SI}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 16 {DLE}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 17 {DC1}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 18 {DC2}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 19 {DC3}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 20 {DC4}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 21 {NAK}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 22 {SYN}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 23 {ETB}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 24 {CAN}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 25 {EM}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 26 {SUB}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 27 {ESC}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 28 {FS}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 29 {GS}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 30 {RS}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 31 {US}
                           [0,0,0,0,0,0,1,1,1,0,0,0], _; 32 { (SPACE)}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 33 {!}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 34 {"}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 35 {#}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 36 {$}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 37 {%}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 38 {&}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 39 {'}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 40 {(}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 41 {)}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 42 {*}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 43 {+}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 44 {,}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 45 {-}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 46 {.}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 47 {/}
                           [0,1,0,0,1,1,0,0,1,1,0,0], _; 48 {0}
                           [0,1,0,0,1,1,0,0,1,1,0,0], _; 49 {1}
                           [0,1,0,0,1,1,0,0,1,1,0,0], _; 50 {2}
                           [0,1,0,0,1,1,0,0,1,1,0,0], _; 51 {3}
                           [0,1,0,0,1,1,0,0,1,1,0,0], _; 52 {4}
                           [0,1,0,0,1,1,0,0,1,1,0,0], _; 53 {5}
                           [0,1,0,0,1,1,0,0,1,1,0,0], _; 54 {6}
                           [0,1,0,0,1,1,0,0,1,1,0,0], _; 55 {7}
                           [0,1,0,0,1,1,0,0,1,1,0,0], _; 56 {8}
                           [0,1,0,0,1,1,0,0,1,1,0,0], _; 57 {9}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 58 {:}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 59 {;}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 60 {<}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 61 {=}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 62 {>}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 63 {?}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 64 {@}
                           [1,1,0,1,0,1,0,0,1,1,0,0], _; 65 {A}
                           [1,1,0,1,0,1,0,0,1,1,0,0], _; 66 {B}
                           [1,1,0,1,0,1,0,0,1,1,0,0], _; 67 {C}
                           [1,1,0,1,0,1,0,0,1,1,0,0], _; 68 {D}
                           [1,1,0,1,0,1,0,0,1,1,0,0], _; 69 {E}
                           [1,1,0,1,0,1,0,0,1,1,0,0], _; 70 {F}
                           [1,1,0,1,0,0,0,0,1,1,0,0], _; 71 {G}
                           [1,1,0,1,0,0,0,0,1,1,0,0], _; 72 {H}
                           [1,1,0,1,0,0,0,0,1,1,0,0], _; 73 {I}
                           [1,1,0,1,0,0,0,0,1,1,0,0], _; 74 {J}
                           [1,1,0,1,0,0,0,0,1,1,0,0], _; 75 {K}
                           [1,1,0,1,0,0,0,0,1,1,0,0], _; 76 {L}
                           [1,1,0,1,0,0,0,0,1,1,0,0], _; 77 {M}
                           [1,1,0,1,0,0,0,0,1,1,0,0], _; 78 {N}
                           [1,1,0,1,0,0,0,0,1,1,0,0], _; 79 {O}
                           [1,1,0,1,0,0,0,0,1,1,0,0], _; 80 {P}
                           [1,1,0,1,0,0,0,0,1,1,0,0], _; 81 {Q}
                           [1,1,0,1,0,0,0,0,1,1,0,0], _; 82 {R}
                           [1,1,0,1,0,0,0,0,1,1,0,0], _; 83 {S}
                           [1,1,0,1,0,0,0,0,1,1,0,0], _; 84 {T}
                           [1,1,0,1,0,0,0,0,1,1,0,0], _; 85 {U}
                           [1,1,0,1,0,0,0,0,1,1,0,0], _; 86 {V}
                           [1,1,0,1,0,0,0,0,1,1,0,0], _; 87 {W}
                           [1,1,0,1,0,0,0,0,1,1,0,0], _; 88 {X}
                           [1,1,0,1,0,0,0,0,1,1,0,0], _; 89 {Y}
                           [1,1,0,1,0,0,0,0,1,1,0,0], _; 90 {Z}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 91 {[}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 92 {\}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 93 {]}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 94 {^}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 95 {_}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 96 {`}
                           [1,1,1,0,0,1,0,0,1,1,0,0], _; 97 {a}
                           [1,1,1,0,0,1,0,0,1,1,0,0], _; 98 {b}
                           [1,1,1,0,0,1,0,0,1,1,0,0], _; 99 {c}
                           [1,1,1,0,0,1,0,0,1,1,0,0], _; 100 {d}
                           [1,1,1,0,0,1,0,0,1,1,0,0], _; 101 {e}
                           [1,1,1,0,0,1,0,0,1,1,0,0], _; 102 {f}
                           [1,1,1,0,0,0,0,0,1,1,0,0], _; 103 {g}
                           [1,1,1,0,0,0,0,0,1,1,0,0], _; 104 {h}
                           [1,1,1,0,0,0,0,0,1,1,0,0], _; 105 {i}
                           [1,1,1,0,0,0,0,0,1,1,0,0], _; 106 {j}
                           [1,1,1,0,0,0,0,0,1,1,0,0], _; 107 {k}
                           [1,1,1,0,0,0,0,0,1,1,0,0], _; 108 {l}
                           [1,1,1,0,0,0,0,0,1,1,0,0], _; 109 {m}
                           [1,1,1,0,0,0,0,0,1,1,0,0], _; 110 {n}
                           [1,1,1,0,0,0,0,0,1,1,0,0], _; 111 {o}
                           [1,1,1,0,0,0,0,0,1,1,0,0], _; 112 {p}
                           [1,1,1,0,0,0,0,0,1,1,0,0], _; 113 {q}
                           [1,1,1,0,0,0,0,0,1,1,0,0], _; 114 {r}
                           [1,1,1,0,0,0,0,0,1,1,0,0], _; 115 {s}
                           [1,1,1,0,0,0,0,0,1,1,0,0], _; 116 {t}
                           [1,1,1,0,0,0,0,0,1,1,0,0], _; 117 {u}
                           [1,1,1,0,0,0,0,0,1,1,0,0], _; 118 {v}
                           [1,1,1,0,0,0,0,0,1,1,0,0], _; 119 {w}
                           [1,1,1,0,0,0,0,0,1,1,0,0], _; 120 {x}
                           [1,1,1,0,0,0,0,0,1,1,0,0], _; 121 {y}
                           [1,1,1,0,0,0,0,0,1,1,0,0], _; 122 {z}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 123 {{}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 124 {|}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 125 {}}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 126 {~}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 127 {¦(DEL)}
                           [0,0,0,0,0,0,0,0,0,0,0,0], _; 128 {Ç}
                           [0,0,0,0,0,0,0,0,0,0,0,0], _; 129 {ü}
                           [0,0,0,0,0,0,0,0,0,0,0,0], _; 130 {é}
                           [1,1,1,0,0,0,0,0,0,0,0,0], _; 131 {â}
                           [0,0,0,0,0,0,0,0,0,0,0,0], _; 132 {ä}
                           [0,0,0,0,0,0,0,0,0,0,0,0], _; 133 {à}
                           [0,0,0,0,0,0,0,0,0,0,0,0], _; 134 {å}
                           [0,0,0,0,0,0,0,0,0,0,0,0], _; 135 {ç}
                           [0,0,0,0,0,0,0,0,0,0,0,0], _; 136 {ê}
                           [0,0,0,0,0,0,0,0,0,0,0,0], _; 137 {ë}
                           [1,1,0,1,0,0,0,0,0,0,0,0], _; 138 {è}
                           [0,0,0,0,0,0,0,0,0,0,0,0], _; 139 {ï}
                           [1,1,0,1,0,0,0,0,0,0,0,0], _; 140 {î}
                           [0,0,0,0,0,0,0,0,0,0,0,0], _; 141 {ì}
                           [1,1,0,1,0,0,0,0,0,0,0,0], _; 142 {Ä}
                           [0,0,0,0,0,0,0,0,0,0,0,0], _; 143 {Å}
                           [0,0,0,0,0,0,0,0,0,0,0,0], _; 144 {É}
                           [0,0,0,0,0,0,0,0,0,0,0,0], _; 145 {æ}
                           [0,0,0,0,0,0,0,0,0,0,0,0], _; 146 {Æ}
                           [0,0,0,0,0,0,0,0,0,0,0,0], _; 147 {ô}
                           [0,0,0,0,0,0,0,0,0,0,0,0], _; 148 {ö}
                           [0,0,0,0,0,0,0,0,0,0,0,0]]; 149 {ò}

But this one doesn't work, and compiler gives an error: "Missing right bracket ')' in expression.: ... ..."

Const $avChars[151][12] = [[1,1,1,1,1,1,1,1,1,1,1,1], _; 0 {NUL}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 1 {SOH}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 2 {STX}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 3 {ETX}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 4 {EOT}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 5 {ENQ}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 6 {ACK}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 7 {BEL}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 8 {BS}
                           [0,0,0,0,0,0,1,1,0,0,1,0], _; 9 {HT}
                           [0,0,0,0,0,0,1,0,0,0,1,0], _; 10 {LF}
                           [0,0,0,0,0,0,1,0,0,0,1,0], _; 11 {VT}
                           [0,0,0,0,0,0,1,0,0,0,1,0], _; 12 {FF}
                           [0,0,0,0,0,0,1,0,0,0,1,0], _; 13 {CR}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 14 {SO}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 15 {SI}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 16 {DLE}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 17 {DC1}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 18 {DC2}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 19 {DC3}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 20 {DC4}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 21 {NAK}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 22 {SYN}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 23 {ETB}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 24 {CAN}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 25 {EM}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 26 {SUB}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 27 {ESC}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 28 {FS}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 29 {GS}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 30 {RS}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 31 {US}
                           [0,0,0,0,0,0,1,1,1,0,0,0], _; 32 { (SPACE)}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 33 {!}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 34 {"}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 35 {#}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 36 {$}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 37 {%}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 38 {&}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 39 {'}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 40 {(}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 41 {)}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 42 {*}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 43 {+}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 44 {,}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 45 {-}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 46 {.}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 47 {/}
                           [0,1,0,0,1,1,0,0,1,1,0,0], _; 48 {0}
                           [0,1,0,0,1,1,0,0,1,1,0,0], _; 49 {1}
                           [0,1,0,0,1,1,0,0,1,1,0,0], _; 50 {2}
                           [0,1,0,0,1,1,0,0,1,1,0,0], _; 51 {3}
                           [0,1,0,0,1,1,0,0,1,1,0,0], _; 52 {4}
                           [0,1,0,0,1,1,0,0,1,1,0,0], _; 53 {5}
                           [0,1,0,0,1,1,0,0,1,1,0,0], _; 54 {6}
                           [0,1,0,0,1,1,0,0,1,1,0,0], _; 55 {7}
                           [0,1,0,0,1,1,0,0,1,1,0,0], _; 56 {8}
                           [0,1,0,0,1,1,0,0,1,1,0,0], _; 57 {9}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 58 {:}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 59 {;}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 60 {<}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 61 {=}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 62 {>}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 63 {?}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 64 {@}
                           [1,1,0,1,0,1,0,0,1,1,0,0], _; 65 {A}
                           [1,1,0,1,0,1,0,0,1,1,0,0], _; 66 {B}
                           [1,1,0,1,0,1,0,0,1,1,0,0], _; 67 {C}
                           [1,1,0,1,0,1,0,0,1,1,0,0], _; 68 {D}
                           [1,1,0,1,0,1,0,0,1,1,0,0], _; 69 {E}
                           [1,1,0,1,0,1,0,0,1,1,0,0], _; 70 {F}
                           [1,1,0,1,0,0,0,0,1,1,0,0], _; 71 {G}
                           [1,1,0,1,0,0,0,0,1,1,0,0], _; 72 {H}
                           [1,1,0,1,0,0,0,0,1,1,0,0], _; 73 {I}
                           [1,1,0,1,0,0,0,0,1,1,0,0], _; 74 {J}
                           [1,1,0,1,0,0,0,0,1,1,0,0], _; 75 {K}
                           [1,1,0,1,0,0,0,0,1,1,0,0], _; 76 {L}
                           [1,1,0,1,0,0,0,0,1,1,0,0], _; 77 {M}
                           [1,1,0,1,0,0,0,0,1,1,0,0], _; 78 {N}
                           [1,1,0,1,0,0,0,0,1,1,0,0], _; 79 {O}
                           [1,1,0,1,0,0,0,0,1,1,0,0], _; 80 {P}
                           [1,1,0,1,0,0,0,0,1,1,0,0], _; 81 {Q}
                           [1,1,0,1,0,0,0,0,1,1,0,0], _; 82 {R}
                           [1,1,0,1,0,0,0,0,1,1,0,0], _; 83 {S}
                           [1,1,0,1,0,0,0,0,1,1,0,0], _; 84 {T}
                           [1,1,0,1,0,0,0,0,1,1,0,0], _; 85 {U}
                           [1,1,0,1,0,0,0,0,1,1,0,0], _; 86 {V}
                           [1,1,0,1,0,0,0,0,1,1,0,0], _; 87 {W}
                           [1,1,0,1,0,0,0,0,1,1,0,0], _; 88 {X}
                           [1,1,0,1,0,0,0,0,1,1,0,0], _; 89 {Y}
                           [1,1,0,1,0,0,0,0,1,1,0,0], _; 90 {Z}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 91 {[}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 92 {\}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 93 {]}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 94 {^}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 95 {_}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 96 {`}
                           [1,1,1,0,0,1,0,0,1,1,0,0], _; 97 {a}
                           [1,1,1,0,0,1,0,0,1,1,0,0], _; 98 {b}
                           [1,1,1,0,0,1,0,0,1,1,0,0], _; 99 {c}
                           [1,1,1,0,0,1,0,0,1,1,0,0], _; 100 {d}
                           [1,1,1,0,0,1,0,0,1,1,0,0], _; 101 {e}
                           [1,1,1,0,0,1,0,0,1,1,0,0], _; 102 {f}
                           [1,1,1,0,0,0,0,0,1,1,0,0], _; 103 {g}
                           [1,1,1,0,0,0,0,0,1,1,0,0], _; 104 {h}
                           [1,1,1,0,0,0,0,0,1,1,0,0], _; 105 {i}
                           [1,1,1,0,0,0,0,0,1,1,0,0], _; 106 {j}
                           [1,1,1,0,0,0,0,0,1,1,0,0], _; 107 {k}
                           [1,1,1,0,0,0,0,0,1,1,0,0], _; 108 {l}
                           [1,1,1,0,0,0,0,0,1,1,0,0], _; 109 {m}
                           [1,1,1,0,0,0,0,0,1,1,0,0], _; 110 {n}
                           [1,1,1,0,0,0,0,0,1,1,0,0], _; 111 {o}
                           [1,1,1,0,0,0,0,0,1,1,0,0], _; 112 {p}
                           [1,1,1,0,0,0,0,0,1,1,0,0], _; 113 {q}
                           [1,1,1,0,0,0,0,0,1,1,0,0], _; 114 {r}
                           [1,1,1,0,0,0,0,0,1,1,0,0], _; 115 {s}
                           [1,1,1,0,0,0,0,0,1,1,0,0], _; 116 {t}
                           [1,1,1,0,0,0,0,0,1,1,0,0], _; 117 {u}
                           [1,1,1,0,0,0,0,0,1,1,0,0], _; 118 {v}
                           [1,1,1,0,0,0,0,0,1,1,0,0], _; 119 {w}
                           [1,1,1,0,0,0,0,0,1,1,0,0], _; 120 {x}
                           [1,1,1,0,0,0,0,0,1,1,0,0], _; 121 {y}
                           [1,1,1,0,0,0,0,0,1,1,0,0], _; 122 {z}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 123 {{}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 124 {|}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 125 {}}
                           [0,0,0,0,0,0,0,0,1,1,0,1], _; 126 {~}
                           [0,0,0,0,0,0,0,0,0,0,1,0], _; 127 {¦(DEL)}
                           [0,0,0,0,0,0,0,0,0,0,0,0], _; 128 {Ç}
                           [0,0,0,0,0,0,0,0,0,0,0,0], _; 129 {ü}
                           [0,0,0,0,0,0,0,0,0,0,0,0], _; 130 {é}
                           [1,1,1,0,0,0,0,0,0,0,0,0], _; 131 {â}
                           [0,0,0,0,0,0,0,0,0,0,0,0], _; 132 {ä}
                           [0,0,0,0,0,0,0,0,0,0,0,0], _; 133 {à}
                           [0,0,0,0,0,0,0,0,0,0,0,0], _; 134 {å}
                           [0,0,0,0,0,0,0,0,0,0,0,0], _; 135 {ç}
                           [0,0,0,0,0,0,0,0,0,0,0,0], _; 136 {ê}
                           [0,0,0,0,0,0,0,0,0,0,0,0], _; 137 {ë}
                           [1,1,0,1,0,0,0,0,0,0,0,0], _; 138 {è}
                           [0,0,0,0,0,0,0,0,0,0,0,0], _; 139 {ï}
                           [1,1,0,1,0,0,0,0,0,0,0,0], _; 140 {î}
                           [0,0,0,0,0,0,0,0,0,0,0,0], _; 141 {ì}
                           [1,1,0,1,0,0,0,0,0,0,0,0], _; 142 {Ä}
                           [0,0,0,0,0,0,0,0,0,0,0,0], _; 143 {Å}
                           [0,0,0,0,0,0,0,0,0,0,0,0], _; 144 {É}
                           [0,0,0,0,0,0,0,0,0,0,0,0], _; 145 {æ}
                           [0,0,0,0,0,0,0,0,0,0,0,0], _; 146 {Æ}
                           [0,0,0,0,0,0,0,0,0,0,0,0], _; 147 {ô}
                           [0,0,0,0,0,0,0,0,0,0,0,0], _; 148 {ö}
                           [0,0,0,0,0,0,0,0,0,0,0,0], _; 149 {ò}
                           [0,0,0,0,0,0,0,0,0,0,0,0]]; 150 {û}

I've also narrowed it down. It doesn't appear that it is the number of elements that limits it, but rather the length of the initialization string. For instance, if I were to cut my second dimension down to only 2 elements, I can initialize all 256 characters just fine:

Edit: Post truncated due to length, see next post.

Edited by neogia

[u]My UDFs[/u]Coroutine Multithreading UDF LibraryStringRegExp GuideRandom EncryptorArrayToDisplayString"The Brain, expecting disaster, fails to find the obvious solution." -- neogia

Posted

I've also narrowed it down. It doesn't appear that it is the number of elements that limits it, but rather the length of the initialization string. For instance, if I were to cut my second dimension down to only 2 elements, I can initialize all 256 characters just fine:

Const $avChars[256][2] = [[0,1], _; 0 {NUL}
                           [0,1], _; 1 {SOH}
                           [0,1], _; 2 {STX}
                           [0,1], _; 3 {ETX}
                           [0,1], _; 4 {EOT}
                           [0,1], _; 5 {ENQ}
                           [0,1], _; 6 {ACK}
                           [0,1], _; 7 {BEL}
                           [0,1], _; 8 {BS}
                           [0,1], _; 9 {HT}
                           [0,1], _; 10 {LF}
                           [0,1], _; 11 {VT}
                           [0,1], _; 12 {FF}
                           [0,1], _; 13 {CR}
                           [0,1], _; 14 {SO}
                           [0,1], _; 15 {SI}
                           [0,1], _; 16 {DLE}
                           [0,1], _; 17 {DC1}
                           [0,1], _; 18 {DC2}
                           [0,1], _; 19 {DC3}
                           [0,1], _; 20 {DC4}
                           [0,1], _; 21 {NAK}
                           [0,1], _; 22 {SYN}
                           [0,1], _; 23 {ETB}
                           [0,1], _; 24 {CAN}
                           [0,1], _; 25 {EM}
                           [0,1], _; 26 {SUB}
                           [0,1], _; 27 {ESC}
                           [0,1], _; 28 {FS}
                           [0,1], _; 29 {GS}
                           [0,1], _; 30 {RS}
                           [0,1], _; 31 {US}
                           [0,1], _; 32 { (SPACE)}
                           [0,1], _; 33 {!}
                           [0,1], _; 34 {"}
                           [0,1], _; 35 {#}
                           [0,1], _; 36 {$}
                           [0,1], _; 37 {%}
                           [0,1], _; 38 {&}
                           [0,1], _; 39 {'}
                           [0,1], _; 40 {(}
                           [0,1], _; 41 {)}
                           [0,1], _; 42 {*}
                           [0,1], _; 43 {+}
                           [0,1], _; 44 {,}
                           [0,1], _; 45 {-}
                           [0,1], _; 46 {.}
                           [0,1], _; 47 {/}
                           [0,1], _; 48 {0}
                           [0,1], _; 49 {1}
                           [0,1], _; 50 {2}
                           [0,1], _; 51 {3}
                           [0,1], _; 52 {4}
                           [0,1], _; 53 {5}
                           [0,1], _; 54 {6}
                           [0,1], _; 55 {7}
                           [0,1], _; 56 {8}
                           [0,1], _; 57 {9}
                           [0,1], _; 58 {:}
                           [0,1], _; 59 {;}
                           [0,1], _; 60 {<}
                           [0,1], _; 61 {=}
                           [0,1], _; 62 {>}
                           [0,1], _; 63 {?}
                           [0,1], _; 64 {@}
                           [0,1], _; 65 {A}
                           [0,1], _; 66 {B}
                           [0,1], _; 67 {C}
                           [0,1], _; 68 {D}
                           [0,1], _; 69 {E}
                           [0,1], _; 70 {F}
                           [0,1], _; 71 {G}
                           [0,1], _; 72 {H}
                           [0,1], _; 73 {I}
                           [0,1], _; 74 {J}
                           [0,1], _; 75 {K}
                           [0,1], _; 76 {L}
                           [0,1], _; 77 {M}
                           [0,1], _; 78 {N}
                           [0,1], _; 79 {O}
                           [0,1], _; 80 {P}
                           [0,1], _; 81 {Q}
                           [0,1], _; 82 {R}
                           [0,1], _; 83 {S}
                           [0,1], _; 84 {T}
                           [0,1], _; 85 {U}
                           [0,1], _; 86 {V}
                           [0,1], _; 87 {W}
                           [0,1], _; 88 {X}
                           [0,1], _; 89 {Y}
                           [0,1], _; 90 {Z}
                           [0,1], _; 91 {[}
                           [0,1], _; 92 {\}
                           [0,1], _; 93 {]}
                           [0,1], _; 94 {^}
                           [0,1], _; 95 {_}
                           [0,1], _; 96 {`}
                           [0,1], _; 97 {a}
                           [0,1], _; 98 {b}
                           [0,1], _; 99 {c}
                           [0,1], _; 100 {d}
                           [0,1], _; 101 {e}
                           [0,1], _; 102 {f}
                           [0,1], _; 103 {g}
                           [0,1], _; 104 {h}
                           [0,1], _; 105 {i}
                           [0,1], _; 106 {j}
                           [0,1], _; 107 {k}
                           [0,1], _; 108 {l}
                           [0,1], _; 109 {m}
                           [0,1], _; 110 {n}
                           [0,1], _; 111 {o}
                           [0,1], _; 112 {p}
                           [0,1], _; 113 {q}
                           [0,1], _; 114 {r}
                           [0,1], _; 115 {s}
                           [0,1], _; 116 {t}
                           [0,1], _; 117 {u}
                           [0,1], _; 118 {v}
                           [0,1], _; 119 {w}
                           [0,1], _; 120 {x}
                           [0,1], _; 121 {y}
                           [0,1], _; 122 {z}
                           [0,1], _; 123 {{}
                           [0,1], _; 124 {|}
                           [0,1], _; 125 {}}
                           [0,1], _; 126 {~}
                           [0,1], _; 127 {¦(DEL)}
                           [0,1], _; 128 {Ç}
                           [0,1], _; 129 {ü}
                           [0,1], _; 130 {é}
                           [0,1], _; 131 {â}
                           [0,1], _; 132 {ä}
                           [0,1], _; 133 {à}
                           [0,1], _; 134 {å}
                           [0,1], _; 135 {ç}
                           [0,1], _; 136 {ê}
                           [0,1], _; 137 {ë}
                           [0,1], _; 138 {è}
                           [0,1], _; 139 {ï}
                           [0,1], _; 140 {î}
                           [0,1], _; 141 {ì}
                           [0,1], _; 142 {Ä}
                           [0,1], _; 143 {Å}
                           [0,1], _; 144 {É}
                           [0,1], _; 145 {æ}
                           [0,1], _; 146 {Æ}
                           [0,1], _; 147 {ô}
                           [0,1], _; 148 {ö}
                           [0,1], _; 149 {ò}
                           [0,1], _; 150 {û}
                           [0,1], _; 151 {ù}
                           [0,1], _; 152 {ÿ}
                           [0,1], _; 153 {Ö}
                           [0,1], _; 154 {Ü}
                           [0,1], _; 155 {¢}
                           [0,1], _; 156 {£}
                           [0,1], _; 157 {¥}
                           [0,1], _; 158 {P}
                           [0,1], _; 159 {}
                           [0,1], _; 160 {á}
                           [0,1], _; 161 {í}
                           [0,1], _; 162 {ó}
                           [0,1], _; 163 {ú}
                           [0,1], _; 164 {ñ}
                           [0,1], _; 165 {Ñ}
                           [0,1], _; 166 {ª}
                           [0,1], _; 167 {º}
                           [0,1], _; 168 {¿}
                           [0,1], _; 169 {¬}
                           [0,1], _; 170 {¬}
                           [0,1], _; 171 {½}
                           [0,1], _; 172 {¼}
                           [0,1], _; 173 {¡}
                           [0,1], _; 174 {«}
                           [0,1], _; 175 {»}
                           [0,1], _; 176 {¦}
                           [0,1], _; 177 {¦}
                           [0,1], _; 178 {¦}
                           [0,1], _; 179 {¦}
                           [0,1], _; 180 {¦}
                           [0,1], _; 181 {¦}
                           [0,1], _; 182 {¦}
                           [0,1], _; 183 {+}
                           [0,1], _; 184 {+}
                           [0,1], _; 185 {¦}
                           [0,1], _; 186 {¦}
                           [0,1], _; 187 {+}
                           [0,1], _; 188 {+}
                           [0,1], _; 189 {+}
                           [0,1], _; 190 {+}
                           [0,1], _; 191 {+}
                           [0,1], _; 192 {+}
                           [0,1], _; 193 {-}
                           [0,1], _; 194 {-}
                           [0,1], _; 195 {+}
                           [0,1], _; 196 {-}
                           [0,1], _; 197 {+}
                           [0,1], _; 198 {¦}
                           [0,1], _; 199 {¦}
                           [0,1], _; 200 {+}
                           [0,1], _; 201 {+}
                           [0,1], _; 202 {-}
                           [0,1], _; 203 {-}
                           [0,1], _; 204 {¦}
                           [0,1], _; 205 {-}
                           [0,1], _; 206 {+}
                           [0,1], _; 207 {-}
                           [0,1], _; 208 {-}
                           [0,1], _; 209 {-}
                           [0,1], _; 210 {-}
                           [0,1], _; 211 {+}
                           [0,1], _; 212 {+}
                           [0,1], _; 213 {+}
                           [0,1], _; 214 {+}
                           [0,1], _; 215 {+}
                           [0,1], _; 216 {+}
                           [0,1], _; 217 {+}
                           [0,1], _; 218 {+}
                           [0,1], _; 219 {¦}
                           [0,1], _; 220 {_}
                           [0,1], _; 221 {¦}
                           [0,1], _; 222 {¦}
                           [0,1], _; 223 {¯}
                           [0,1], _; 224 {a}
                           [0,1], _; 225 {ß}
                           [0,1], _; 226 {G}
                           [0,1], _; 227 {p}
                           [0,1], _; 228 {S}
                           [0,1], _; 229 {s}
                           [0,1], _; 230 {µ}
                           [0,1], _; 231 {t}
                           [0,1], _; 232 {F}
                           [0,1], _; 233 {T}
                           [0,1], _; 234 {O}
                           [0,1], _; 235 {d}
                           [0,1], _; 236 {8}
                           [0,1], _; 237 {f}
                           [0,1], _; 238 {e}
                           [0,1], _; 239 {n}
                           [0,1], _; 240 {=}
                           [0,1], _; 241 {±}
                           [0,1], _; 242 {=}
                           [0,1], _; 243 {=}
                           [0,1], _; 244 {(}
                           [0,1], _; 245 {)}
                           [0,1], _; 246 {÷}
                           [0,1], _; 247 {}
                           [0,1], _; 248 {°}
                           [0,1], _; 249 {·}
                           [0,1], _; 250 {·}
                           [0,1], _; 251 {v}
                           [0,1], _; 252 {n}
                           [0,1], _; 253 {²}
                           [0,1], _; 254 {¦}
                           [0,1]]; 255 { }

[u]My UDFs[/u]Coroutine Multithreading UDF LibraryStringRegExp GuideRandom EncryptorArrayToDisplayString"The Brain, expecting disaster, fails to find the obvious solution." -- neogia

Posted

...but rather the length of the initialization string.

Maximum length of a single script line: 4,095

Do you think that you hit that limit?

[size="1"][font="Arial"].[u].[/u][/font][/size]

Posted

cant u jsut put all that in an ini file and read it into the program that way, itd be easier then declaring them individually probably

_____________________________________________________"some people live for the rules, I live for exceptions"Wallpaper Changer - Easily Change Your Windows Wallpaper

Posted (edited)

I was/am attempting to classify each of the 256 ascii characters into the 12 classes specified in Nutster's StringRegExp() function: ("alpha","alnum","lower","upper","digit","xdigit","space","blank","print","graph","cntrl","punct")

Now I'm left with 3072 lines of declaration statements to either type or make AutoIt type out for me :)

Edit: I get what you mean about the repetitive lines, but I was trying to think of a way to automate the generation of the array, but it's mainly intellectual, isn't it? I guess I could use StringRegExp() itself to generate the array. I wonder how long that would take..

Edited by neogia

[u]My UDFs[/u]Coroutine Multithreading UDF LibraryStringRegExp GuideRandom EncryptorArrayToDisplayString"The Brain, expecting disaster, fails to find the obvious solution." -- neogia

Posted

One thing you could do that would really cut down on your code:

looks like you are using each array element (12 of them per character) as a boolean (0/1 value). Instead of wasting a whole variable on that, use a single integer and use BitOR() and BitAND() to set and check the bits. Since an integer has 32 bit, and you only need 12, it should be fairly simple.

Posted

One thing you could do that would really cut down on your code:

looks like you are using each array element (12 of them per character) as a boolean (0/1 value). Instead of wasting a whole variable on that, use a single integer and use BitOR() and BitAND() to set and check the bits. Since an integer has 32 bit, and you only need 12, it should be fairly simple.

Ooh, hey, I really like that idea. I'll have to give that a try tomorrow. Nice one.

[u]My UDFs[/u]Coroutine Multithreading UDF LibraryStringRegExp GuideRandom EncryptorArrayToDisplayString"The Brain, expecting disaster, fails to find the obvious solution." -- neogia

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...