Search found 356 matches
- Dec 27, 2018 1:17
- Forum: Sources, Examples, Tips and Tricks
- Topic: Fast clipping lines in BASIC.
- Replies: 19
- Views: 5262
Re: Fast clipping lines in BASIC.
I remember this code from way back in another thread and it is the fastest I have seen. There is an anomaly that is very minor but may impact the way this is used. The outputed line does not always match that which comes from the Line command. You can see the artifacts left using this code: screenre...
- Dec 23, 2018 0:13
- Forum: Libraries & Headers
- Topic: Simple Font-Library
- Replies: 11
- Views: 4859
Re: Simple Font-Library
I just want to add that I tried it with FBC32 on Ubuntu and FBC64 and no crashes. However changing the depth to 16 or 32 does freeze the program on keypress to exit. The problem narrows down to the line in font.bi and the load function: Get fntimg,(wholewide,0)-(wholewide+wide(i)-1,size-1),Char(i) I...
- Dec 22, 2018 8:56
- Forum: Libraries & Headers
- Topic: Simple Font-Library
- Replies: 11
- Views: 4859
Re: Simple Font-Library
Oh sorry, I didn't see that part of your post.
I just tried it with sans (on Ubuntu and it worked fine as does serif.
Perhaps sans.fnt is corrupt. Mine is 927 bytes.
I just tried it with sans (on Ubuntu and it worked fine as does serif.
Perhaps sans.fnt is corrupt. Mine is 927 bytes.
- Dec 22, 2018 6:29
- Forum: Libraries & Headers
- Topic: Simple Font-Library
- Replies: 11
- Views: 4859
Re: Simple Font-Library
I'm on Ubuntu and your code works fine. Where is the error message getting "Free()" from? That function is not in any of the files. Also make sure that the program is finding 'mono.fnt'. There is no error message or return value to indicate if load worked (BadIdea I recommend some kind of ...
- Dec 21, 2018 8:22
- Forum: Beginners
- Topic: Array pointer assignment
- Replies: 26
- Views: 3321
Re: Array pointer assignment
In the case UEZ presents, the copy constructor is not necessary as you have shown, FXM. Good to know, but isn't the implicit copy limited to simple intrinsic types only? If you were to add in some pointers or managed memory, then the copy constructor becomes necessity. At that point you can't rely o...
- Dec 21, 2018 3:17
- Forum: Beginners
- Topic: Array pointer assignment
- Replies: 26
- Views: 3321
Re: Array pointer assignment
Nearly always people have an absolute need for speed when copying arrays. On the occasion that it is not important I suggest wrapping the array in a type and giving yourself more options. Here is a type that offers four methods of copying an array. All four use the same for next loop. IMHO I like th...
- Dec 21, 2018 2:41
- Forum: Community Discussion
- Topic: adding FreeBASIC to the TIOBE index
- Replies: 38
- Views: 8284
Re: adding FreeBASIC to the TIOBE index
I have never heard of TIOBE before either. Is there a reason/benefit to be mentioned there? I doubt that programmers or potential programmers are visiting the site to decide on a language. On a side note lets look at the massive mistake made by MS when they dropped VB and switched to Dot Net. 20 yea...
- Dec 21, 2018 2:22
- Forum: Community Discussion
- Topic: Nominations for Forum Moderators
- Replies: 70
- Views: 15233
Re: Nominations for Forum Moderators
Congratulations Imortis, and thank you for stepping up to the plate.
- Dec 20, 2018 3:28
- Forum: Sources, Examples, Tips and Tricks
- Topic: Fast track an array of points.
- Replies: 4
- Views: 1010
Re: Fast track an array of points.
Interesting trick/tip.
I took a brief look at the code. Are you cycling through all possible paths and choosing the shortest?
I took a brief look at the code. Are you cycling through all possible paths and choosing the shortest?
- Dec 18, 2018 2:46
- Forum: Sources, Examples, Tips and Tricks
- Topic: Type FixLenStr (fixed size String Type)
- Replies: 3
- Views: 1085
Re: Type FixLenStr (fixed size String Type)
I recommend overloading at least the Cast/String so that one could use simply:
? myfixlenstr
I would also add the &, Let, and any other that are available to the built in fixed length string.
? myfixlenstr
I would also add the &, Let, and any other that are available to the built in fixed length string.
- Dec 17, 2018 4:01
- Forum: General
- Topic: No type check of UDT array's bug or feature ?
- Replies: 5
- Views: 766
- Dec 17, 2018 1:50
- Forum: Sources, Examples, Tips and Tricks
- Topic: Concatenate 2 arrays using operator & and Union
- Replies: 6
- Views: 1291
Re: Concatenate 2 arrays using operator & and Union
I am not %100 sure where your latest code fails. Here is a way to accomplish the concatenation of two n sized arrays using the string concat operator & or the + operator via explicit cast. It uses operator new[] to create enough memory for the new array. I have no idea if there is speed gains ov...
- Dec 15, 2018 5:05
- Forum: Sources, Examples, Tips and Tricks
- Topic: Concatenate 2 arrays using operator & and Union
- Replies: 6
- Views: 1291
Re: Concatenate 2 arrays using operator & and Union
Nice job Tourist, You can remove the warnings with a cast: 'change the arrays content into plain integers dim as uinteger<4*8> ptr uiptr1 uiptr1 = Cast(uinteger<32> ptr, @bytearray1(0)) '' *uiptr eats the byte array on its 4bytes integer length dim as uinteger<4*8> ptr uiptr2 uiptr2 = Cast(uinteger<...
- Dec 14, 2018 5:09
- Forum: Sources, Examples, Tips and Tricks
- Topic: Insert/Replace String procedures
- Replies: 38
- Views: 5782
Re: Insert/Replace String procedures
@wq1980
I just tested it with same length replace strings and it works fine.
My guess is your file is unicode.
I just tested it with same length replace strings and it works fine.
My guess is your file is unicode.
- Dec 12, 2018 4:29
- Forum: Sources, Examples, Tips and Tricks
- Topic: Insert/Replace String procedures
- Replies: 38
- Views: 5782
Re: Insert/Replace String procedures
In my opinion the tricky part is in the fact that you can't deallocate the memory until after the user has gotten and dealt with the result string. There is no way for the function to know when that happens. So do we devise a running list of pointers to new memory each time replace is called? I don'...