0 Members and 1 Guest are viewing this topic.
Well, I asked since I was not sure if it was even possible at all on Mac. Back in the TI-Connect 1.2 days, you could only send your files as groups on the computer and on old versions of TiLP it automatically tried to group everything you tried to send.
I learned the hard way that group files are more problems than anything else in the community, because if you send any of my old calc RPG grouped to your calc using TI-Connect for windows, a lot will have the first program of each group be corrupted (ERR:UNDEFINED on launch). My inbox often got spammed in the past due to that in ROL3 RPG
Anyway, TI-Connect at school works (I love Macs ), so here's a version of my program. It comes as a group with two programs: CALCALCA (the main program) and LOW (an ASM subroutine to allow lowercase).When you run prgmCALCALCA, nothing seems to happen, and the calculator still seems to be at the homescreen. It's actually already in the program; the blank screen is from the Input "",Str1. The program leaves most of the calculation intact, so if you type in a normal expression (such as 1+1), it'll just display the answer (with expr(Str1. The key is that the program checks for the string "_into_ or " INTO (notice the spaces), and if it's found within the input, it goes into evaluation mode.Syntax for evaluation is [expression] into [unit] or [expression] INTO [unit] (again, notice the spaces). Other spaces are ignored by the evaluator, so you could type 5 N m into ft lb or 5Nm into ft*lb, and it would display the same answer. This is so that input is more natural and easier to read. However, the program is actually looping through each character in the string input, so the shorter the input, the faster the program can evaluate it.If the units are mismatched on the two sides of the input, the programs throws an ERR:MISMATCH, but I have yet to add the other error messages (e.g., for unrecognized units).I haven't compiled a list of supported units left, but in case you're wondering, they're all in Str1 (after you run the program at least once). Just look for the alpha characters. By the way, the program is case sensitive, so mPa is millipascals, while MPa is megapascals. Do not put an extra s at the end of a unit, even for a unit such as lb.All SI prefixes from yocto to Yotta are supported, except for milli- and Tera- on three-character base units (such as cal, acr, and are), as well as millitonnes (who would ever use that?). All units must be abbreviated. Thus, 5 amperes2*6 ohms INTO milliwatts will not work, while 5 A2*6 ohm INTO mW will.Addition, subtraction, and functions are not supported, and probably never will be, but since they are simply skipped over by the evaluator, 8 J into ft-lb will be read as "8 (J)" into "(ft)(lb)". Unlimited numbers of parentheses, division, exponentiation (including 2, 3, and -1), and multiplication (duh) are supported.I know, the program still runs pretty slowly. I'll still have to optimize some things. Until then, everyone is allowed (and encouraged) to look into the code, and suggestions are (very) welcome.
Should there be a space after 10? I haven't tried it myself, so I'm just throwing out suggestions. Also, maybe it should be IN, rather than INCH? (Maybe case matters too)
I tried '7IN INTO CM' and it gave a syntax error i also tried '7 IN INTO CM' and '7 In Into Cm' and '7In Into Cm' and they all gave syntax errors and when i press goto it just goes to the program
Ok, so I just tried this on WabbitEmu. I tried converting 180 pounds into kilograms and got a ERROR:MISMATCH. I tried "180lb into kg" and "180lbs into kg" (in case you differentiated between the two for some reason) and it didn't work.