Re: making multiple arrays with one file

Hi,
hmm, okay, I have forgotten that bgt doesn't have the char type, you are right of course.
In other languages, char is a well known type representing one character, it can be one byte in size as in C++ or two bytes, so it can hold unicode characters like in C#. Strings are then internally just arrays of char type, so you can access any character using its index.
Bgt works internally in the same way, that's why you can access characters in strings using indexes i.e.

string message="Mammoths like chocolate.";
alert("Announcement", "Chocolate starts with "+message[14]+". What a surprise.";

Just in bgt you don't receive char type, but another string containing one character, for some mysterious reason.
The length is meaned to be the string length, although again just meaned as bgt doesn't represent this with a property, but with a method, plus I have written lenght instead of length, dumb me.
So instead of input.length, there should be input.length().

reader is an instance of file class, i.e.

file reader;
reader.open("filetoread.txt", "r");

I didn't specified it explicitly as I was mentioning the file class in connection to read_until method, you can find both in bgt's documentation.

And of course, as you work with strings, ignore my apostrophes and use quotes instead.

Sorry for these mistakes, I haven't worked with bgt for a quite long time, so I have forgotten some details about it. smile
I have edited my post, with fix of all of these.

Best regards

Rastislav



-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — New releases room : Zarvox via Audiogames-reflector
    • ... AudioGames . net Forum — New releases room : omer via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : omer via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Zarvox via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Zarvox via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Zarvox via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Zarvox via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Zarvox via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Zarvox via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : CAE_Jones via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Zarvox via Audiogames-reflector

Reply via email to