Search found 82 matches

by McLovin
Nov 26, 2008 12:25
Forum: Community Discussion
Topic: The Direction of FreeBasic development...
Replies: 21
Views: 5039

Hi Marcov, Just curious as to why you believe that maintaining a BNF grammar file would be more difficult then maintaining the actual rules in the code base itself. I see your point about maintaining backwards compatibility as new versions are released, but I also see that as being easy to maintain ...
by McLovin
Nov 25, 2008 15:31
Forum: Community Discussion
Topic: The Direction of FreeBasic development...
Replies: 21
Views: 5039

Note that even if not useful for the compiler, it can still be useful for auxilary utils where the full parser is too painful. Like doc tools, pretty printers, cross references. Ah, good point! Right now all of this is just an academic exerice for me to stretch my brain when it comes to syntax dire...
by McLovin
Nov 25, 2008 12:16
Forum: Community Discussion
Topic: The Direction of FreeBasic development...
Replies: 21
Views: 5039

I have been working on a parser front-end for FreeBASIC written in BNF and using GOLD as the parser generator. It has been a fun experience so far. I have the engine written that reads the GOLD generated tables. I have a GOLD template that receives the GOLD tables directly so that they can be compil...
by McLovin
Nov 25, 2008 1:14
Forum: Community Discussion
Topic: The Direction of FreeBasic development...
Replies: 21
Views: 5039

FreeBASIC is alive and strong. It is a great compiler that has features that other BASIC compilers can only wish that they had.

Developers will come to FB. It is the circle of life.

----
Fogell
by McLovin
Nov 19, 2008 23:10
Forum: General
Topic: ANOTHER question: Erasing a UDT
Replies: 26
Views: 3657

If your Type doesn't contain any variable strings then a simple method to clear it would be to use the C function MemSet. #include "crt\string.bi" type MyType1 st1 as string * 50 i1 as integer d1 as double end type type MyType2 st2 as string * 50 i2 as integer d2 as double MyT1 as MyType1 ...
by McLovin
Nov 19, 2008 14:26
Forum: General
Topic: ANOTHER question: Erasing a UDT
Replies: 26
Views: 3657

Having a way to reinitialize a TYPE sounds like a good feature to have built into the compiler. The function would need to take into account field padding as well I guess. Something like TYPECLEAR or TYPEINIT or TYPERESET..... ?
by McLovin
Nov 18, 2008 3:03
Forum: General
Topic: Select Case > 0
Replies: 13
Views: 1540

The Select Case 0 is pretty interesting. I have never done that before. Thanks! However, I still don't see how the Select Case ideas are any better than a simple If/ElseIf construct. In terms of long term code maintenance, it would be certainly more readable and logical to understand. Having said th...
by McLovin
Nov 18, 2008 1:32
Forum: General
Topic: Select Case > 0
Replies: 13
Views: 1540

Is it practical for you to configure your 30 variables as a 30 element array of your variable type (e.g. Integer?) That way you could simply iterate the array with a simple For/Next and test for > 0. If that is not practical then I think another solution would be a series of If/ElseIf's: If Varbl1 >...
by McLovin
Nov 17, 2008 1:39
Forum: Community Discussion
Topic: suggestions
Replies: 8
Views: 2423

I suspect that a lot of people find this project and expect it to have an IDE like QB45 or a visual designer like Visual Basic. They don't make a distinction between a "compilier" and an "IDE". When they get to a command prompt it can be overwhelming for novice programmers.

----
Fogell
by McLovin
Nov 17, 2008 0:06
Forum: General
Topic: Pointer Error
Replies: 4
Views: 757

You seem to be passing an uninitialized pointer to the function. Try sending the variable address of a regualr integer variable to the function.

Instead of:

Dim As Any Ptr BarPercent

Try:

Dim As Integer BarPercent


Hope this works for you.

----
Fogell
by McLovin
Nov 15, 2008 13:51
Forum: Beginners
Topic: Dim Statement
Replies: 3
Views: 809

You need to use arrays in this situation. Individual variables is not the best solution. Dim Shared myArray1(101 to 120) As Inteegr Dim Shared myArray2(201 to 220) As Integer Dim Shared myArray8(801 to 820) As Integer ... or use a two dimension array Dim Shared myArray1( ...
by McLovin
Nov 15, 2008 2:23
Forum: Beginners
Topic: Bypass compiler ENVIRON() check for fbFindBinFile()
Replies: 8
Views: 1393

thanks counting_pine - you're exactly right. I forgot that a copy of the environment is used when shelled to cmd/command. I've been using the compiler via the usb hard drive for the past couple of days with no trouble. Lots left to learn about the compiler source code - hopefully someday soon I'll h...
by McLovin
Nov 14, 2008 2:24
Forum: Community Discussion
Topic: freebasic goals
Replies: 5
Views: 2833

I'm having a hard time understanding the post.... One thing that I am sure of is that I am not in favor of this comment: "However, I do advocate that there is a need for a version which adheres to the original concept;... I propose that the fbc organization add a second goal, that of selecting from ...
by McLovin
Nov 13, 2008 18:42
Forum: Beginners
Topic: Bypass compiler ENVIRON() check for fbFindBinFile()
Replies: 8
Views: 1393

Yes you're right and I did a little bit further investigation. Only the "AS" environment variable fails. Attempts to get the other bin paths all work. It looks like on this system that the admins set the "AS" environment variable to equal the server name. I'm not sure what purpose it is used for but...
by McLovin
Nov 13, 2008 16:31
Forum: Beginners
Topic: Bypass compiler ENVIRON() check for fbFindBinFile()
Replies: 8
Views: 1393

I modified the source code and re-compiled with the following change to the fbFindBin function: #ifndef STANDALONE '' get from environment variable if allowed if( (opts and FB_FINDBIN_ALLOW_ENVVAR) <> 0 ) then path = environ( ucase(*filename) ) if( len(path...

Go to advanced search