Search found 9056 matches

by fxm
Jan 16, 2010 16:20
Forum: Beginners
Topic: Declare Sub Question
Replies: 4
Views: 1450

I totally agree.
Remark : for the default value in case of conflict, Declare seems to have priority over header.
by fxm
Jan 15, 2010 12:09
Forum: Beginners
Topic: Declare Sub Question
Replies: 4
Views: 1450

In order to simplify the programming, I advise you to have the declaration line and the line defining the subroutine identical in terms of passing parameters. Declare Sub Delay(ByRef seconds As Double=1) . . . . . . . . Sub Delay(ByRef seconds As Double=1) . . . . . . . . End Sub Remark : The minimu...
by fxm
Jan 09, 2010 17:25
Forum: General
Topic: Address of a procedure included in UDT ? [solved]
Replies: 4
Views: 1011

Yes, I already read this documentation carefully (and many other pages!). I found a way a bit twisted (and complicated) to manage static data within a 'Type ... End Type' block: I use a static function that contains the static data (Static As ...). With a control input parameter, this function allow...
by fxm
Jan 09, 2010 14:09
Forum: General
Topic: Address of a procedure included in UDT ? [solved]
Replies: 4
Views: 1011

D.J.Peters,

Thank you very much for the quick response.

I have another similar question:
Is there also a way to define static data within an 'Type ... End Type' block?
by fxm
Jan 08, 2010 22:37
Forum: General
Topic: Address of a procedure included in UDT ? [solved]
Replies: 4
Views: 1011

Address of a procedure included in UDT ? [solved]

Can I get the the address of a Sub or Function procedure included in a "Type ... End Type" block ? Example of program with compilation failed on the line 15 : error 18: Syntax error in 'SubX = @THIS.Subroutine' DIM SHARED SubX AS SUB () TYPE Test Value AS INTEGER DECLARE SUB InitSubX (&#...
by fxm
Dec 27, 2009 15:45
Forum: Windows
Topic: can't get focus
Replies: 15
Views: 3233

Remark about the FreeBasic keyword 'Shell' Shell sends a command to the system command interpreter, and main program execution is suspended until the command interpreter exits. From your main program, if you want launch an other program 'MyProgram' from an other path 'MyPath', you code : 'Main prog...
by fxm
Dec 27, 2009 7:39
Forum: Windows
Topic: can't get focus
Replies: 15
Views: 3233

Try to call "ScreenRes" with the flag : GFX_ALWAYS_ON_TOP (&h20), which creates a window that stays always on top :
ScreenRes width, height [, [depth] [, [num_pages] [, [flags] [, refresh_rate ]]]]
by fxm
Dec 26, 2009 19:36
Forum: Beginners
Topic: Multiplication limitless Version #2
Replies: 8
Views: 1378

- Put your program code between '[code]' and '[/code]' (uncheck 'Disable BBCode in this post') - Use the command button <Preview> to visualize your message before <Submit> - I have always an error at the line 78 'GET #3, lt5, pr$' : 'Aborting due to runtime error 1 (illegal function call) at line 78...
by fxm
Dec 26, 2009 13:03
Forum: Beginners
Topic: Multiplication limitless Version #2
Replies: 8
Views: 1378

I am very surprised because I just tested your original program in QB45 (and also in QB71 and VisualBasic DOS 1.0), and it always stops on the instruction :
Open X$ + ".MLT" For Binary As #2
with a "bad file name" abort message.

This instruction being just after :
Get #1, JB, X$
by fxm
Dec 26, 2009 10:10
Forum: Beginners
Topic: Multiplication limitless Version #2
Replies: 8
Views: 1378

I have not tried to understand the program, but I think that the error is due to the call of "GET #..." with an empty string data buffer. Consequently, I modified two lines, and I obtain a program which does not hang. But is it working well? Modified lines : 32 and 79 #lang "qb" ' Multipli...
by fxm
Dec 25, 2009 10:48
Forum: Community Discussion
Topic: Good morning ladies :-)
Replies: 31
Views: 5013

I join @JL35 and @SARG to wish you all a Merry Christmas from France too.
by fxm
Dec 24, 2009 16:57
Forum: Windows
Topic: ScreenRes & Console
Replies: 4
Views: 1318

I usually use 2 different methods to input / output on the text console (while the program runs in a graphic window : - first simple method using "shell" to just output string - second method using "open cons" to manage input/output of strings (see also documentation) examples of my own procedures F...
by fxm
Dec 24, 2009 16:16
Forum: Beginners
Topic: logon to FBWiki and FBArchive
Replies: 4
Views: 909

Some time ago, I had to occasionally delete cookies from site freebasic.net in order to successfully login!
by fxm
Dec 21, 2009 9:47
Forum: General
Topic: Constructor cannot pass string data type
Replies: 5
Views: 1080

See below an extract of the documentation The destructor method is called when a user defined Type or Class variable goes out of scope or is destroyed explicitly with the Delete operator... Since the End statement does not close any scope, object destructors will not automatically be called if the E...
by fxm
Dec 20, 2009 19:47
Forum: General
Topic: Constructor cannot pass string data type
Replies: 5
Views: 1080

Where there is an error. Const objectfile As String = "objectdata.txt" Dim As ObjectClass objects(objectfile) This line try to declare an array of objects (with objectfile elements) ! In order to call constructor, I think that you must modify as below : Dim As ObjectClass objects = ObjectClass(objec...

Go to advanced search