Search found 233 matches
- Feb 23, 2021 15:42
- Forum: Beginners
- Topic: How to modularize code
- Replies: 16
- Views: 380
- Dec 03, 2020 16:47
- Forum: General
- Topic: Fast 2d Torus routine needed
- Replies: 4
- Views: 316
Re: Fast 2d Torus routine needed
You could get some ideas from the GDI implementation in Wine: search keywords in repository : https://github.com/wine-mirror/wine/blob/6d801377055911d914226a3c6af8d8637a63fa13/dlls/gdiplus/graphics.c GdipDrawArc From there you get GdipAddPathArc and then https://github.com/wine-mirror/wine/blob/6d80...
- Nov 10, 2020 13:44
- Forum: General
- Topic: File handling problems
- Replies: 11
- Views: 692
Re: File handling problems
Alternatives could be somthing like SQLite or Firebird as embedded Database: Firebird could also later be easily changed to client/server mode Squirrel or Lua: Loading lua tables: https://www.freebasic.net/forum/viewtopic.php?f=7&t=22223&hilit=+Lua#p195498 For saving data you could use Serpe...
- Sep 08, 2020 9:51
- Forum: Community Discussion
- Topic: FreeBASIC 1.08 Development
- Replies: 309
- Views: 30409
Re: FreeBASIC 1.08 Development
I had some ideas a while ago making macros much more powerfull. Introducing some macro statements for context handling would be great.
https://www.freebasic.net/forum/viewtopic.php?f=2&t=28465&p=270769#p270769
https://www.freebasic.net/forum/viewtopic.php?f=2&t=28465&p=270769#p270769
- Jun 06, 2020 18:14
- Forum: General
- Topic: Optimum sum of a set of numbers
- Replies: 18
- Views: 1338
Re: Optimum sum of a set of numbers
There could be some possibilities to optimize the alghorithm for speed or even for memory consumption, but first you must define the parameters define "set of numbers" the range / any negative numbers how many are there duplicates are they random or ... define the number "optimum sum&...
- Jun 05, 2020 6:54
- Forum: Community Discussion
- Topic: native At&t Assembly emitter
- Replies: 17
- Views: 1422
Re: native At&t Assembly emitter
The world of the barebones is very diverse If i understand you correctly, you want to work and compile on an embedded system or a thin client. But why dont you use a normal workstation/notebook to do that? To test the program you can use than your embedded system. You also could use a VM with the l...
- Apr 17, 2020 13:57
- Forum: Beginners
- Topic: Preprocessor creation in a loop possible?
- Replies: 4
- Views: 560
Re: Preprocessor creation in a loop possible?
NASM has a very powerful preprocessor. It's so powerful that you can create things like nested block statements: for/next if/elseif/else/endif blocks .. Thats because of a very simple but powerfull context stack : so we would need something like #push|#pop|#set context #if defined(context) so we onl...
- Apr 10, 2020 19:02
- Forum: DOS
- Topic: Why do you still program for DOS?
- Replies: 26
- Views: 10509
Re: Why do you still program for DOS?
Ten years ago we still used a factura program / database based on OpenAccess4. It was so fast.. with only 2 or 3 key strokes you could be in any subprogram in less than a second. It did run well on Windows 32 bit. In DOS there is often only one way to do things UI wise. That makes it simpler after g...
- Nov 15, 2019 20:58
- Forum: Beginners
- Topic: Need speedup
- Replies: 23
- Views: 2325
Re: Need speedup
Another option is to use ASM with AVX / AVX2 instructions: Each YMM register can hold and do simultaneous operations on eight 32-bit single-precision floating point numbers. So basically if the algorithm could be optimally transformed you could gain almost 8 times the speed. Realistically it could b...
- Nov 15, 2019 20:44
- Forum: Beginners
- Topic: Need speedup
- Replies: 23
- Views: 2325
Re: Need speedup
Maybe it's faster if you change this by using less divisions df=((-1e12 /Rgquadro)/Rgquadro/Rgquadro)+.4 also you could change the select case: 'Maybe ? Dim as Double Rgquadro If Rglue >140 Then df=9512/((Rgquadro)) Else If rglue>= 10 Then df=((-1e12 /(Rgquadro*Rgquadro*Rgquadro)+.4 Else df=0 NUM_ER...
- Nov 10, 2019 13:30
- Forum: Community Discussion
- Topic: FreeBASIC Namespace Project
- Replies: 72
- Views: 9406
Re: FreeBASIC Namespace Project
Keywords like Name, Width, Color can't be used as properties or membervars in types, that's a bit annoying. That would be no problem if most keywords get out of global namespace.
- Nov 09, 2019 9:24
- Forum: General
- Topic: Len of udt
- Replies: 7
- Views: 633
Re: Len of udt
If you work with RANDOM files and Type records it's important not to use "As Integer" . Just "as Integer" could be 4 byte or 8 byte weather you compile for a 32 or 64 bit platform. . So if at some point you are changing platform, it would break file format compatibility and you c...
- Nov 04, 2019 17:15
- Forum: Community Discussion
- Topic: FreeBASIC Namespace Project
- Replies: 72
- Views: 9406
Re: FreeBASIC Namespace Project
I have been thinking for a while about the quirks and about namespaces or some sort of package system. I would introduce some sort of auto namespace mode, which reflects the directory structure. Also things like an auto include mode or a compiler project / options file would be nice to have some com...
- Oct 08, 2019 15:05
- Forum: Community Discussion
- Topic: retro-basic
- Replies: 9
- Views: 1816
Re: retro-basic
This code does the same as Joshy's but can be run from both QB and FB. So with QB you could actually write readable code.
Code: Select all
SCREEN 13
DIM x AS INTEGER
DIM y AS INTEGER
FOR Y = 0 TO 199
FOR x = 0 TO 319
PSET (x,y), x AND 127 * Y AND 127
NEXT
NEXT
SLEEP
- Jun 20, 2019 15:41
- Forum: General
- Topic: smart code formatter
- Replies: 9
- Views: 1916
Re: smart code formatter
Regular expressions are very useful: search pattern: ^(\t*)[ ]{3,5} replace with: $1\t Explanation: linebeginning followed by arbitrary number of tabs followed by 3-5 spaces and replaced by preveoiusly found tabs + one tab replacing 3-5 spaces. search and replace several times with notepad++ Spaces ...