Vectrex32

General Category => General Discussion => Topic started by: Pix on August 17, 2018, 08:14:21 AM

Title: Cast String to Int?
Post by: Pix on August 17, 2018, 08:14:21 AM
Really quick question. Is there an inbuilt function to cast a string to an integer? I ask as I can't find anything in the documentation and am looking to use the newly added file input/output to read some in game data. I can obviously write my own function if I have to but I would imagine there must be something there already.
Title: Re: Cast String to Int?
Post by: Vectrex32 on August 17, 2018, 09:01:03 AM
It appears I messed up by not including a way to convert strings to numbers (e.g. a Val() function). When the V32 didn't support user input or file I/O, converting strings to ints wasn't something that would ever be necessary. And when I added file I/O, it just didn't occur to me to add Val().

Sorry. I'll add it to the list of features for the next release.

- Bob