c = 0; lp = 1234567890; p = 0; digit = func(i:int, pos:int) { result = i // 10**pos % 10; log("digit " + int_to_str(pos) + " of " + int_to_str(i) + " is " + int_to_str(result)); return result; }; numdigits = func(i:int) { if (i == 0) return 0; return float_to_int(log10(i)) + 1; }; c += 1; lp = lp * 10 + d; lp = d; c = 1; lp = lp * 10 + d; c += 1; p = lp;