Search found 5589 matches

by counting_pine
Jan 22, 2006 1:46
Forum: Beginners
Topic: Program code
Replies: 33
Views: 10121

Does echo print "hello world" > hello.bas count as using an editor :)
by counting_pine
Jan 22, 2006 1:38
Forum: Beginners
Topic: Variale types(noob question)
Replies: 8
Views: 2124

One thing that might be worth mentioning is that in FreeBASIC, the "byte" type is signed, while in Visual Basic, "byte" is unsigned. This threw me a bit when I first started using FB.
by counting_pine
Jan 22, 2006 0:42
Forum: Beginners
Topic: test parser
Replies: 51
Views: 10204

K, I'll try and work in a sorting algorithm, but first some changes need to be made: First of all, a change in two lines of the parser function: Function Parser(ByVal count as integer, ByVal tmpText as string, ByVal delimiter as ubyte = 9) as string Dim text as string Dim i as integer Dim arg as str...
by counting_pine
Jan 18, 2006 20:06
Forum: Beginners
Topic: test parser
Replies: 51
Views: 10204

Yes, I understand now. In the bad code, when the inner "for n" loop finished, n was equal to lastn + 1. If the array was dimmed up to lastn, then the "print #2, players(n).ipnumber; chr$(9); players(n).playername" statement would cause the program to crash. I've made a couple of ...
by counting_pine
Jan 18, 2006 16:36
Forum: Beginners
Topic: test parser
Replies: 51
Views: 10204

I will have a look over the code, to see if I can find anything wrong with it. If you could let me know which version of the compiler you're using, that might be helpful too. Er yes, I forgot to mention about the DIMs. You told me the input data was six lines, so I made the array big enough for that...
by counting_pine
Jan 17, 2006 23:45
Forum: Beginners
Topic: test parser
Replies: 51
Views: 10204

[quote="ltd"]would it be easier to sort by playername? it's not that big of deal. i'm still testing the program, when i checked it this morning, the program had crashed, and the output file called "playersIP.txt" was empty. I was playing around w/ it today w/ my test files & ...
by counting_pine
Jan 17, 2006 14:22
Forum: Beginners
Topic: test parser
Replies: 51
Views: 10204

That would be possible, but a bit tricky. You'll have to have a sort routine between checking for duplicates and writing the file. And if you want to sort by IP number, you'll have to write a function that will convert the IP number string to an integer. The converting function probably wouldn't be ...
by counting_pine
Jan 17, 2006 0:56
Forum: Beginners
Topic: test parser
Replies: 51
Views: 10204

It's good to see that you're starting to adapt the code, to get it to do what you want it to do. OK, I don't know if this is the best way to do it, but this is how I'd check for duplicates: Basically, when I'm outputting the data, for each line, I'll first check each subsequent line to see if it has...
by counting_pine
Jan 16, 2006 15:56
Forum: Beginners
Topic: test parser
Replies: 51
Views: 10204

I put all the code togther, it's failing @ the print function. The error says "array not dimensioned, before: ' (' ": print #2, playerdata(n).ipnumber; chr$(9); playerdata(n).playername playerdata is a type, not an array. I believe you already have an array defined for that information, d...
by counting_pine
Jan 16, 2006 15:28
Forum: Beginners
Topic: test parser
Replies: 51
Views: 10204

i wonder would it be a bad idea to suggest using a comma separated list for these files? It would help by preventing confusion between tabs and spaces, and it could allow you to use INPUT without needing a parsing function, but I don't know if the input file format can be changed to that, and thing...
by counting_pine
Jan 15, 2006 22:09
Forum: Beginners
Topic: test parser
Replies: 51
Views: 10204

The main reason why your code isn't working is because you've put "Parser$(4,text n)" instead of "Parser$(4,text(n))". OK, it's occurred to me that playersinput.txt and playersoutput.txt are in different formats. So when you're reading in both files, you'll need to put them in th...
by counting_pine
Jan 15, 2006 20:41
Forum: Beginners
Topic: Feature-Request_ "rookie"-mode for the fbc?
Replies: 24
Views: 5640

If you write the sub or function before the code that calls it, then you don't have to declare it.
by counting_pine
Jan 15, 2006 1:01
Forum: Beginners
Topic: test parser
Replies: 51
Views: 10204

ok, my code is not right, how do you "do until" or "do while" for data that is stored in an array, not a file? OPEN "playersinput.txt" FOR INPUT AS #1 OPEN "playersoutput.txt" FOR APPEND AS #2 DIM lines() AS STRING redim lines(0 to 10) n = n + 1 DO WHILE NOT ...
by counting_pine
Jan 14, 2006 23:51
Forum: Beginners
Topic: test parser
Replies: 51
Views: 10204

Thanks for taking time to help me, I really appreciate it. First, a question: is it nessasary to redim "lines", can't I just start like this?: dim lines(1 to 100) as string That line creates a static (fixed size) array, which mean you won't be able change its size while the program is run...
by counting_pine
Jan 14, 2006 1:20
Forum: Beginners
Topic: test parser
Replies: 51
Views: 10204

Sorry if I'm oversimplifying things a bit. I'll try and post some more helpful information. OK, first of all, you'll need to make an array of strings, call it 'lines', say: dim lines() as string At the moment the array's size is zero, so you'll need to give it a range of numbers to work with. Say 1 ...