## Search found 9519 matches

Apr 05, 2011 9:20
Forum: Beginners
Topic: minimize-maximize-close window in fbgfx.bi
Replies: 5
Views: 1816
What has chr(255) + "k" to do with clicking on the "X" / close button? How are they related? Extract of the FreeBASIC manual, keyword "Screen (Graphics)", paragraph "Other details": While in windowed mode, clicking on the window close button will add a keypress of Chr(255)&"k" to the Inkey buff...
Apr 05, 2011 8:57
Forum: General
Topic: True or false?
Replies: 13
Views: 2252
And while I'm here, I'll give my usual "NOT is a unary operator, not a function" warning. Admittedly it's not likely to become an issue in standard use-cases, but don't come crying when NOT(a) - NOT(a) gives 2 * NOT(a). Explanation for beginners: - The parentheses are there to mislead, because they...
Apr 04, 2011 20:47
Forum: Beginners
Topic: minimize-maximize-close window in fbgfx.bi
Replies: 5
Views: 1816
Some ideas to detect the graphic window state: Testing the current window position (x, y), in desktop coordinates, you can detect: - the minimize window state (x=-32000, y=-32000). - the maximize window state (always x=0, y=0), but it is not a test absolutely sure, because the position (0, 0) can e...
Apr 03, 2011 8:02
Forum: General
Topic: True or false?
Replies: 13
Views: 2252
Ok now I see my problem.... BOOL: (Integer) -- normal return code for a dialog False = 0 True = -1 BOOLEAN: ( UBYTE ) False = 0 True = 255 So to make things equate the same, BOOLEAN should be changed to a BYTE I think not. Currently, most of the languages use the convention True = 1 and False = 0, ...
Apr 02, 2011 20:34
Forum: General
Topic: New button "Strike-through" in the post editor ?
Replies: 1
Views: 884

### New button "Strike-through" in the post editor ?

In addition to buttons "Bold", "Italic", "Underline", it would be possible to have a new button "Strike-through" to better highlight the successive updates (author reviews)?
Apr 02, 2011 18:56
Forum: General
Topic: True or false?
Replies: 13
Views: 2252
Whether there's any difference between BOOL and BOOLEAN would depend on how you define them respectively. I think BOOL is defined in the Win32 API as just an Integer, and TRUE/FALSE being 1/0 (so be careful of using NOT or comparing with TRUE). I don't know about BOOLEAN. "win/windef.bi" type WINBO...
Apr 02, 2011 18:28
Forum: General
Topic: Recursive Sub calls, If statements, etc
Replies: 13
Views: 2239

### Re: Recursive Sub calls, If statements, etc

dodicat wrote:You cannot recursive call a macro, which is not handy, but you can recursive call a gosub in lang fblite, which I believe does not add garbage to the stack.

To work around 'Gosub' / 'Return', you can use Asm blocks.
See this topic :
http://www.freebasic.net/forum/viewtopi ... 264#102264
Apr 02, 2011 18:09
Forum: Community Discussion
Topic: Language Extension Through Preprocessing
Replies: 47
Views: 9582
Anyway, this is no big deal, because if 'extends' is finally chosen (probably), the fiercest partisans of 'inherits' can always insert at the top of their source:
#define inherits extends
Apr 02, 2011 16:25
Forum: Community Discussion
Topic: Language Extension Through Preprocessing
Replies: 47
Views: 9582
Here is another issue with "extends" that I couldn't articulate till I saw another example of its usage: cat extends animal In English, when you "extend" something, you build onto it in some fashion. The cat UDT does not extend the animal UDT -- the animal UDT remains unchanged -- the cat UDT only ...
Apr 02, 2011 13:33
Forum: Community Discussion
Topic: New fbc branch ('inheritance') on sourceforge (fbc SVN)
Replies: 133
Views: 30511
In my last simulation, I use another method with Namespace ... End Namespace to encapsulate a global data, and with property to allow access from any instance. My last method simulates a static member data with full access in read and write from namespace-identifier or from any instance of namespac...
Apr 02, 2011 5:49
Forum: Community Discussion
Topic: New fbc branch ('inheritance') on sourceforge (fbc SVN)
Replies: 133
Views: 30511
hello fxm as a workaround i simulate an instance shared counter with a static function http://www.freebasic.net/forum/viewtopic.php?t=17558 Joshy Yes. Before I have also used this principle to simulate static data within Type ... End Type: http://www.freebasic.net/forum/viewtopic.php?p=129199#12919...
Apr 01, 2011 23:12
Forum: Community Discussion
Topic: New fbc branch ('inheritance') on sourceforge (fbc SVN)
Replies: 133
Views: 30511
Are there plans to complete the user-define type support by adding the ability to define static member data (in addition to the static member function)? Behavior: - When a member data is declared as static, only one copy of the data is maintained for all instances of the type. - Static member data ...
Apr 01, 2011 9:52
Forum: General
Topic: How to get rid of shared variable
Replies: 10
Views: 1715
Yes, but you should also say: Why define a user-define type as scaling-type, whereas we use a single instance? - Define a user-type including 2 data and even perhaps 2 functions, just to create a single instance, seems excessive and wasteful! - You could use a 'namespace' block (which allows period...
Apr 01, 2011 5:16
Forum: General
Topic: How to get rid of shared variable
Replies: 10
Views: 1715
@fxm: An option, but I don't like it. It would make sense if I had multiple instances of scaling_type. E.g.: * raw2scrn(raw, scale1) * raw2scrn(raw, scale2) But for only 1 scaling_type variable, using passing as function parameter seems odd. Yes, but you should also say: Why define a user-define ty...
Mar 31, 2011 9:18
Forum: General
Topic: Screen formatting
Replies: 14
Views: 1485
In QuickBasic 7.1 / PDS 7.1, VisualBasic DOS 1.0, VisualBasic Windows, VBA, there is the 'Currency' Data Type: - Currency variables are stored as 64-bit numbers (8 bytes) in a two's complement integer format, and are scaled by 10,000 to give a fixed-point number with 15 digits to the left of the dec...