Search found 1939 matches
- Jun 29, 2022 22:21
- Forum: General
- Topic: Feature request: strings in UDTs
- Replies: 23
- Views: 766
Re: Feature request: strings in UDTs
The string must always be null terminated. Otherwise, it won't work with all string functions, because string functions expect a null character. Not necessarily. The only information needed by the string function is where the string ends: and that information can be provided by putting a zero at th...
- Jun 27, 2022 19:01
- Forum: Community Discussion
- Topic: Suggestion about the inner Dictionary or Collection.
- Replies: 9
- Views: 388
Re: Suggestion about the inner Dictionary or Collection.
Well, using generics you wouldn't have to dig deeply in the language, all you have to do is to include a simple header file. In C++ (that uses generics), if you want to implement a linked list, or an associative array, you can dig in the language, but you don't have to if you don't want. Declaring a...
- Jun 27, 2022 10:42
- Forum: Windows
- Topic: Drawing directly on the screen
- Replies: 0
- Views: 96
Drawing directly on the screen
This example should draw a line on the screen, over the windows already displayed
Code: Select all
#include "Windows.bi"
dim as HDC hDC = GetDC(0)
MoveToEx(hdc, 0, 0, NULL)
LineTo(hdc, 1000, 1000)
ReleaseDC(NULL, hdc)
- Jun 27, 2022 0:35
- Forum: Community Discussion
- Topic: Suggestion about the inner Dictionary or Collection.
- Replies: 9
- Views: 388
Re: Suggestion about the inner Dictionary or Collection.
Actually, there are two possibilities: one is implementing generics, the other is implementing only some containers (dictionaries and lists, for example) as part of the language. Both solutions have advantages and disadvantages: generics and templates is surely more versatile, although more like c++...
- Jun 26, 2022 10:35
- Forum: Community Discussion
- Topic: Suggestion about the inner Dictionary or Collection.
- Replies: 9
- Views: 388
Re: Suggestion about the inner Dictionary or Collection.
Do you suggest to implement it using hash table or binary tree?
- Jun 24, 2022 10:44
- Forum: General
- Topic: Feature request: strings in UDTs
- Replies: 23
- Views: 766
Re: Feature request: strings in UDTs
By the way, a ZSTRING doesn't have that issue: its length is exactly as declared, inside a type Yes, but the maximum number of useful characters for the user is 'length - 1' (because of the mandatory terminal character). I made some tests: it is actually possible to use all the characters, removing...
- Jun 23, 2022 17:19
- Forum: General
- Topic: Feature request: strings in UDTs
- Replies: 23
- Views: 766
Re: Feature request: strings in UDTs
What is the point of using a FIELD parameter when you can already use ZSTRING? It's literally just one character to add. Maybe in QB mode the strings inside a TYPE should be treated as ZSTRINGS, just to make UDT compatible with QB (in case one is porting a program that was supposed to read a file wi...
- Jun 23, 2022 16:26
- Forum: General
- Topic: Feature request: strings in UDTs
- Replies: 23
- Views: 766
Re: Feature request: strings in UDTs
At this point, I doubt: changing that would break too much existing FreeBasic code.
By the way, a ZSTRING doesn't have that issue: its length is exactly as declared, inside a type
By the way, a ZSTRING doesn't have that issue: its length is exactly as declared, inside a type
- Jun 18, 2022 16:41
- Forum: DOS
- Topic: Some questions about fbc for DOS/FreeDOS.
- Replies: 2
- Views: 167
Re: Some questions about fbc for DOS/FreeDOS.
1) No, I have just tested on DosBox, FreeBasic returns an error message if there is no DPMI extender. By the way, is the file CWSDPMI.EXE either in the FreeBasic directory, or in another directory in the search path, the program written in FreeBasic (and the compiler itself) can invoke it, loading a...
- Jun 18, 2022 16:05
- Forum: DOS
- Topic: ISR + coroutines = Multitasking in DOS
- Replies: 5
- Views: 4234
Re: ISR + coroutines = Multitasking in DOS
Here it is:D.J.Peters wrote: ↑Jun 18, 2022 8:39 @angros47 can you share the ready to use compiled lib for DOS here ?
https://www.mediafire.com/file/0apraqvl ... bco.o/file
- Jun 17, 2022 14:46
- Forum: General
- Topic: Operator Mod not possible for pointers
- Replies: 5
- Views: 248
Re: Operator Mod not possible for pointers
The reason is likely that pointers are supposed to be already aligned, since a pointer can refer to any size. If you need to align them "by hand" you aren't using them in the way they are supposed to be used
- Jun 16, 2022 22:13
- Forum: DOS
- Topic: [solved] FreeDOS CTMOUSE PS2 mouse does not work here :-(
- Replies: 7
- Views: 329
Re: FreeDOS CTMOUSE PS2 mouse does not work here :-(
Being a proprietary software, it is not part of FreeDos
It should be available here: https://winworldpc.com/product/microsoft-mouse/
It should be available here: https://winworldpc.com/product/microsoft-mouse/
- Jun 16, 2022 18:07
- Forum: DOS
- Topic: [solved] FreeDOS CTMOUSE PS2 mouse does not work here :-(
- Replies: 7
- Views: 329
Re: FreeDOS CTMOUSE PS2 mouse does not work here :-(
Have you tried using a different driver? Like the Microsoft drivers for Ms-DOS?
From what you said, it seems that the issue is in CTMOUSE (if with other drivers the mouse works you might have to file a bug report)
From what you said, it seems that the issue is in CTMOUSE (if with other drivers the mouse works you might have to file a bug report)
- Jun 15, 2022 21:40
- Forum: General
- Topic: probabily oldest freebasic bug :P
- Replies: 17
- Views: 601
Re: probabily oldest freebasic bug :P
Again, it is not a bug. It is how FreeBasic is supposed to act in the old QBASIC functions could be invoked only inside expression, so an attempt to write "ShowNum(5)" would have caused an error, it should have been a sub to work In C, on the other hand, it's possible to use a function as ...
- Jun 15, 2022 5:57
- Forum: General
- Topic: probabily oldest freebasic bug :P
- Replies: 17
- Views: 601
Re: probabily oldest freebasic bug :P
The behavior is indeed correct: to achieve the result 5 and 10 you should use: dim i as integer i=ShowNum(5)+ShowNum(10) in fact, in FreeBasic a FUNCTION can also be invoked as if it were a SUB (that is not possible in QBASIC, but is possible in C): also, while in C a command must have its parameter...