5 Value::Value(const char* s) {
8 if (val == 0 || strlen(val) == 0) return;
9 char* v = new char[strlen(val) + 5];
11 int pos = strlen(v) - 1;
12 if (v[pos] == 'K' || v[pos] == 'k') {
16 if (v[pos] == 'M' || v[pos] == 'm') {
23 int Value::getIntVal(void) {
24 if (val == 0 || strlen(val) == 0) return 0;
25 return (atoi((const char*)val) * factor);
28 void Value::print(XStr& str) { str << val; }
30 ValueList::ValueList(Value* v, ValueList* n) : val(v), next(n) {}
32 void ValueList::print(XStr& str) {
38 if (next) next->print(str);
41 void ValueList::printValue(XStr& str) {
46 die("Unsupported type");
50 void ValueList::printValueProduct(XStr& str) {
51 if (!val) die("Must have a value for an array dimension");
58 next->printValueProduct(str);
62 void ValueList::printZeros(XStr& str) {
64 if (next) next->printZeros(str);