Search found 62 matches

by hippy
Jan 30, 2006 14:53
Forum: General
Topic: Potential Threaded App Problems
Replies: 4
Views: 1130

In basic terms, if two threads attempt to write to the same data area at the same time, the data will be left as set by one thread but not by the other, and in the worse case, will be partly set by one thread and partly set by the other. The consequences of this will depend upon the nature of the da...
by hippy
Jan 30, 2006 14:25
Forum: Beginners
Topic: using dir$ to fill an array
Replies: 27
Views: 9563

I'm stating the way that wildcards do operate. They may or may not operate that way in the DIR$ function. Okay, but that is in many ways irrelevant to the issue of what DIR$ does and what DIR$ is meant to do, and doesn't do much but cloud the issue at hand. It is also not correct to say that is the...
by hippy
Jan 30, 2006 3:47
Forum: Beginners
Topic: using dir$ to fill an array
Replies: 27
Views: 9563

on windows *.* will return files named like 'COPYING' (which has no dot) But is that because it's meant to do that and tunginobi's statements are wrong ( or perhaps irrelevant if refering to Linux while we're all talking about Windows ), or does it do that because DIR$ isn't working as it should ? ...
by hippy
Jan 30, 2006 2:19
Forum: Sources, Examples, Tips and Tricks
Topic: String Reversal
Replies: 6
Views: 3130

sub Reverse( byref source as string, first as integer, last as integer ) It's quite confusing that first and last aren't both indexed from the same base point ... s$ = "ABCD" : Reverse(s$,1,3) gives "ACBD" first==1 is the 2nd character, but last==3 is the 3rd character. s$ = &qu...
by hippy
Jan 30, 2006 1:11
Forum: Beginners
Topic: using dir$ to fill an array
Replies: 27
Views: 9563

"*.*" will match any file or folder that has a peroid (.) in its name. ".*" will match any file or folder with a period at the beginning of its name. "*." will match any file or folder with a period at the end of its name. "*" will match any file or folder, r...
by hippy
Jan 28, 2006 19:00
Forum: Beginners
Topic: using dir$ to fill an array
Replies: 27
Views: 9563

one way ... Option Explicit Dim directoryArray$(1000) Dim fileArray$(1000) Dim directoryArrayTop& Dim fileArrayTop& Dim filename$ Dim i& filename$ = DIR$("C:\*.*",16) WHILE filename$ <> "" directoryArrayTop& = directoryArrayTop&+1 directoryArray$(directoryArra...
by hippy
Jan 27, 2006 13:27
Forum: Archive
Topic: Space Impakto in realtime scale_2x
Replies: 22
Views: 7602

18 FPS

AMD K6-2/500, SiS 6326, Win 98SE - Not everyone has a whizz-bang PC.

Clunky but definitely still playable, but far too cluttered as others have said.
by hippy
Jan 16, 2006 17:57
Forum: Beginners
Topic: test parser
Replies: 51
Views: 10201

Code: Select all

open "playersoutput.txt" for output as #2 
for n = 1 to lastn 
  print #2, players(n).ipnumber; chr$(9); players(n).playername 
next n 
close #2
Your 'lastn' is probably zero, because you never set it to a value anywhere.
by hippy
Jan 12, 2006 6:04
Forum: Sources, Examples, Tips and Tricks
Topic: Binary file to .BAS code
Replies: 9
Views: 6445

The reason the code is as so, is because this program is for both FreeBASIC and Qbasic. Qbasic has no Dir$ command or a file exist command (and THAT's truly horrible). You've got me there; I hadn't appreciated that. In such circumstances there is often very little else to do. I think your error tra...
by hippy
Jan 11, 2006 19:34
Forum: Sources, Examples, Tips and Tricks
Topic: Binary file to .BAS code
Replies: 9
Views: 6445

I don't make a habit of criticising people's code, but as this is in Tips and Tricks I hope you'll excuse me for doing so ... '=== Open and check for existance OPEN Infile$ FOR BINARY AS 1 IF LOF(1) = 0 THEN CLOSE 1: KILL Infile$ PRINT UCASE$(Infile$); " not found!": END END IF Truly horri...
by hippy
Jan 11, 2006 19:21
Forum: General
Topic: Website written FreeBASIC
Replies: 11
Views: 2338

axipher wrote:Maybe I used GUI wrong
Actually I think the confusion set in when you suggested creating a website. "Creating a client side application, which acts like a browser", makes much more sense descriptively.
by hippy
Jan 09, 2006 22:33
Forum: Beginners
Topic: test parser
Replies: 51
Views: 10201

Yes; change the line

i& = Instr(text$," ")

to

i& = Instr(text$,Chr$(9))
by hippy
Jan 09, 2006 4:21
Forum: DOS
Topic: DIR$ broken?
Replies: 1
Views: 2468

Re: DIR$ broken?

I have some code which does a dir$("*.*", 16) to list directories, and it returns everything. It works fine under Windows. The sample on the wiki DIR$ page returns everything in both loops. Dir$() is meant to work that way, usually it just lists 'normal' files, adding bits into the attrib...
by hippy
Jan 07, 2006 10:46
Forum: Beginners
Topic: test parser
Replies: 51
Views: 10201

One way, probably not the best ... Function Parser$(ByVal count&, ByVal tmpText$) Dim text$ Dim i& Dim arg$ Dim argNumber& text$ = tmpText$ argNumber& = 0 Do argNumber& = argNumber&+1 If argNumber& = 5 Then arg$ = text$ Else i& = Instr(text$," ") If i& =...
by hippy
Dec 30, 2005 4:10
Forum: General
Topic: passing cmd line params in RUN command.
Replies: 7
Views: 1836

KiZ wrote:dkl, I put together a test that plainly doesnt work, using a very simple example:runtest.rar
Doesn't work for me either. Putting a PRINT "In Blarg2" shows that Blarg2 isn't executing at all when there's any text following the executable name in the RUN in Blarg1.