View Single Post
Old Dec 5th, 2005, 6:37 PM   #6
Rory
Expert Programmer
 
Rory's Avatar
 
Join Date: Jan 2005
Location: London
Posts: 542
Rep Power: 4 Rory is on a distinguished road
Send a message via MSN to Rory
I think CInt(X) / Ctype(X,Integer) will still throw an exception if the string cannot be interpreted as a number. Stick it in a Try...Catch and reject bad input with an error message . However perhaps this sort of information shouldn't be hardcoded, as your program could fall down if a change is required. A lookup table in a database or xml file would give you the added flexibility that could get those extra marks.

But the sort of thing he's more likely to have got hung up on is the UI; you could have used an Up/Down control instead of textbox that comes with built-in numeric type validation. Perhaps the interface could be a little clearer, highlighted total, an icon etc, it pays to show off (a little).

These sort of "unimportant" things generally concern examiners/markers more; even if you did use an amazingly elegant piece of recursion, the fact you put a combobox where a radiogroup was required is sadly more important just because of their personal views and that you violated some obscure design guidelines invented by ignorant syllabus writers in the first place. I could continue...
Rory is offline   Reply With Quote