Quote:
>>I'm currently writing a program using QBasic, in which I need
>>to input a string from the user and convert it into a number.
>>ie. INPUT a$ ; where a$ may well be "(a-5000)/2 +
>(b-5001)*1999"
>>Using VAL doesn't work, so can the string be evaluated relatively
>>easily (assuming values for a and b are known)? Is there a
>command
>>which I've overlooked?
>>In the very old BBC Micro BASIC (probably not very familiar to
>>people outside the UK), there was a command called EVAL which did
>>exactly what I need.
There is a programme that does just this, in QBasic. However, it's about
30k... I have it, if you want to see it (can't remember who wrote it,
though).
--
David Burbridge >> http://www.*-*-*.com/ ;<
"And Jehu answered, ...Turn thee behind me. And the watchman told, saying,
...the driving is like the driving of Jehu the son of Nimshi; for he driveth
furiously." [II Kings 9 vv 19-20] (yes it's biblical quote time again!)