Search found 23 matches
- Sep 01, 2023 15:13
- Forum: Community Discussion
- Topic: Header files license ?
- Replies: 5
- Views: 1877
Re: Header files license ?
I guess the argument would be that these files are used by the the generated application, which can be any appropriate license, including commercial. They are not a part of the compiler itself which is GPL and taints everything linked to it. Also, given that the Oracle vs Google decision (as this no...
- Aug 26, 2023 0:50
- Forum: Community Discussion
- Topic: Header files license ?
- Replies: 5
- Views: 1877
Header files license ?
The header files supplied with fbc do not have a specific license included, however they do have this notice NOTICE: This file is part of the FreeBASIC Compiler package and can't be included in other distributions without authorization This would seem to conflict with both the GPL and the LGPL. So, ...
- Aug 19, 2022 4:43
- Forum: Sources, Examples, Tips and Tricks
- Topic: Windows Console - Extended Input Subroutine
- Replies: 9
- Views: 2141
Re: Windows Console - Extended Input Subroutine
[2022 Aug 18] Here is an enhanced version of the extended input routine along with a test program. Added are: Several more key code captures including next word (CntlRightArrow) and previous word (CntlLeftArrow) capabilities. Ctrl+Delete to clear the whole field Insert key toggle to insert or overwr...
- Jul 28, 2022 21:02
- Forum: Sources, Examples, Tips and Tricks
- Topic: String Function replace() - Replace all occurrences of one character with another
- Replies: 17
- Views: 1895
Re: String Function replace() - Replace all occurrences of one character with another
@deltarho Thanks for posting the link to Paul Squires string routines. When I did a search, I did not find that posting. One nice thing about posting routines, even if similar ones have been posted in the past, is that it refreshes the current listings, and someone will always point out where relate...
- Jul 28, 2022 20:56
- Forum: Sources, Examples, Tips and Tricks
- Topic: String Function replace() - Replace all occurrences of one character with another
- Replies: 17
- Views: 1895
Re: String Function replace() - Replace all occurrences of one character with another
That is why I love posting routines, even if not perfect. Often end up getting something back that is even better even better.
- Jul 20, 2022 13:14
- Forum: Sources, Examples, Tips and Tricks
- Topic: String Function findnext() - find the first location of a character after a location
- Replies: 2
- Views: 504
Re: String Function findnext() - find the first location of a character after a location
Thanks everyone. I appreciate all the feedback. I am a retired, now hobbyist, formally professional programmer (using a different language). I haven't worked with Freebasic much, so posting these little bits of code is really helping me learn more about the language and it's capabilities.. I really ...
- Jul 20, 2022 3:56
- Forum: Sources, Examples, Tips and Tricks
- Topic: String Function findnext() - find the first location of a character after a location
- Replies: 2
- Views: 504
String Function findnext() - find the first location of a character after a location
This is an example program for a findnext() function. It would be normally used after the find() function uploaded previously. For example, if you have a CSV (comma separated values) string and you want to retrieve the data between two commas, you could get the location of the first delimiter and th...
- Jul 19, 2022 23:26
- Forum: Sources, Examples, Tips and Tricks
- Topic: String Function find() - Find the location of the nth instance of a character in a string
- Replies: 2
- Views: 509
String Function find() - Find the location of the nth instance of a character in a string
Some additional modifications to the code of the previously uploaded count() function and we can return the location of the nth instance of a character in a string. 'Program: FindFunctionExample ' Find() finds the nth occurence of a character in a string ' and returns the location '=================...
- Jul 19, 2022 22:25
- Forum: Sources, Examples, Tips and Tricks
- Topic: String Function count() - Count all instances of a character in a string
- Replies: 1
- Views: 502
String Function count() - Count all instances of a character in a string
Slight modification of previously posted replace() function results in a new function count(). Useful if you need to find out how many delimited sub-strings are in a string. The number of sub-strings will be count()+1. 'Program: CountFunctionExample ' This program demonstrates a count() function ' c...
- Jul 19, 2022 14:54
- Forum: Sources, Examples, Tips and Tricks
- Topic: String Function replace() - Replace all occurrences of one character with another
- Replies: 17
- Views: 1895
Re: String Function - Replace all occurrences of one character with another
In the responses, the for statement had a -1 added to the end. Both the original code and the changed code work. What I don't understand is why. Just looking at it, it seems that the last character in the string should never be accessed as len(SearhString) returns the proper length of the string. fo...
- Jul 18, 2022 22:12
- Forum: Sources, Examples, Tips and Tricks
- Topic: String Function replace() - Replace all occurrences of one character with another
- Replies: 17
- Views: 1895
Re: String Function - Replace all occurrences of one character with another
Here is the modified test program implementing most of the suggestions made. Thank you. The only suggestion I didn't include was passing variables by reference. I avoid global variables and byref parameters because they decrease encapsulation. Just my own personal coding fetish. 'Program: ReplaceFun...
- Jul 17, 2022 22:16
- Forum: Sources, Examples, Tips and Tricks
- Topic: String Function replace() - Replace all occurrences of one character with another
- Replies: 17
- Views: 1895
String Function replace() - Replace all occurrences of one character with another
String function replace() with example program 'Program: ReplaceFunctionExample ' This program shows how the included 'replace' function ' converts all instances of one character in a string to another '================================================== ' replace function '==========================...
- Jul 15, 2022 17:19
- Forum: Sources, Examples, Tips and Tricks
- Topic: Windows Console - Area Fill Subroutine
- Replies: 0
- Views: 2482
Windows Console - Area Fill Subroutine
This program, box, contains the subroutine FillArea. You can specify either spaces or one of three different fill characters, and choose the location, size and color of the fill. The program uses the US English keyboard codes with the Consolas font. Users may need to modify it for other languages an...
- Jul 15, 2022 17:08
- Forum: Sources, Examples, Tips and Tricks
- Topic: Windows Console - Box Drawing Subroutine
- Replies: 2
- Views: 688
Re: Windows Console - Box Drawing Subroutine
As mentioned in the header, it was tested for US English with the consolas font. For other languages/fonts the box drawing characters may have different codes. Some console fonts may not even have box drawing characters. This is a working template for the language and font specified. Users can modif...
- Jul 15, 2022 14:50
- Forum: Sources, Examples, Tips and Tricks
- Topic: Windows Console - Box Drawing Subroutine
- Replies: 2
- Views: 688
Windows Console - Box Drawing Subroutine
This program, box, contains the subroutine DrawBox. You can specify the type, location, size and the colors of the box lines when calling the subroutine. Single, Double and mixed lines are supported. This example program will draw four boxes, each with a different line type, size, and color combinat...