© 1st December 2000 Cameron Arnott All Rights Reserved |
In this issue: |
Attachments:
|
Proposed For Future Issues:
|
Letter from the Editor | Back to the Top |
Wow, November went so fast, with three beta releases of Liberty BASIC V2 with the release version just around the corner Carl certainly has been busy. It has also been another bumper month in the mailing list with 226 subscribers and over 1300 messages being posted and setting another new record, of which i have made a selection of interesting code and interesting tips for the archive. "Thanks Giving" was celebrated this month. I for one am thankful for everyone's support, help, kind wishes and praise for what I am doing for the Liberty BASIC community. I'd also like to thank Carl for writing such a powerful, easy to use and learn programming language, for putting up with all of our suggestions and nags about improvements, and to sort through them all to see which of them should be implemented in Liberty BASIC. There are a growing number of very worthwhile projects on the go and in development here are some just to name a few: As you can see, Liberty BASIC can be used to develop a wide range of programs. We have programmers from the age of thirteen right up and (way) past forty years of age. All enjoying, learning, writing programs, helping others write programs and generally having a good time. Don't forget the "2001, A Liberty BASIC Odyssey" you can find the refined and amended rules for the contest on http://libertybasic.swiki.net The Red-Hot Price on the "flaming" LB2 T-Shirt is about to finish. When LB2 is released to the public the price of the shirt will revert back to its normal price. You can purchase this and other Liberty Basic Merchandise Happy Programming Cameron Arnott - AKA Blue_Steel blue_steel@globalfreeway.com.au |
Spotlight on a fellow LB programmer - Brandon Watts | Back to the Top |
This month's spotlight is on Brandon Watts, unfortunately he doesn't have a picture of himself on his computer that he can send us.  He is 14 years old and has his own web page at http://www.wattsware.com.  His Email address is brandonwatts@ga.prestige.net.  Previous programming experience was for 3 months using QBASIC.  He has been using Liberty BASIC for about a year and a half.  Brandon rates himself as an intermediate programmer using Liberty BASIC.  Brandon started programming in Liberty BASIC for it's ease of use, it's power, and the great online community.  He Says "I found it one day just searching the web for a basic programming language.  I was very delighted when I found out how great it was!" Brandon rates Liberty BASIC a 9.9 out of 10. "It's the only language I use anymore! :=)" Brandon's other interests include being the lead guitarist in a band called "Korrosion". Gotta love the name! "I also enjoy sports like basketball and baseball, and getting together with friends". I asked Brandon for a few words for all of you. This is what he said:I just wanted to say what an honor it is to be a member of such a great programming group. Everyone here has been kind and helped me out VERY much. For that, I say thank you. |
Software Archives - By Brandon Watts http://www.wattsware.com | Back to the Top |
So you have just created an awesome program. Now you are excited to let the world know about it. This can be one of the most exciting stages in software development. The feeling of accomplishment is wonderful. One of the best ways of advertising is software archives. These sites on the internet hold programs from different companies and people. Some are freeware, some are shareware. Many people visit these sites, and downloads of your software can be abundant. But before you submit your software to these sites, there are a few things that you should know. Make sure your program is good. That may sound obvious, but it can be one of the most important factors to consider. Since many people will be downloading your product, opinions could be formed about the quality of your software. Some of these sites even have people that will review your programs. What they say will affect how many people download the software. Debug. This goes along with making sure your program is good. I have heard of examples of people having obvious errors in their programs. This is very embarrassing. I will admit my own shortcomings in this matter. In one of my programs, I had a menu item open a text file. It worked fine for everyone using Windows 98. However Windows 95 changed the name of the file a little bit. This caused an error that could crash the program. Just make sure everything is compatible with all versions of the operating system you develop for. Offer comprehensive help and contact information. Make sure you include a great help file. It will help them use your product, and a better help file will make some people use your product longer. Contact information will let them know that you are ready to help them should problems arise. Offer a variety of ways to contact you. There is a service called Onebox, which gives you a free phone number. You can check your messages from a phone or log into your account on the net. I use it, and love it. Their address is: Now you are ready to upload your program. The process is very easy, and they ask you a few questions about file size, name, website, etc. Make sure the information you type in is correct. Here is a list of some of the major ones you should submit to: http://www.hotfiles.com http://www.download.com http://www.tucows.com http://www.32bit.comYou can also use programs that do it for you. I suggest the program SoftSubmit. It is made by AnalogX. It has a huge list of archives to submit to. Get it at: These software archives also make it easy for you to update your programs listing when you make new versions. Be patient. Many of these sites are so backed up, it can take forever to be listed. One of the programs I submitted to download.com took them over two months for them to get back to me! Uploading your software is very easy. Just make sure you follow the steps in this article, and your product is sure to be a hot download. |
Binary Searches - By Richard Miller | Back to the Top | ||||||
The first principle is to halve the search range after each unsuccessful compare. The second principle is that the values to be searched must be in sequential order. Example 1: (binsrch.bas)First, an array is filled with even integers from 2 to 3998. The reason for skipping odd values is to show what happens when a value is not found. I chose to make the array a string array, so the values have to have leading zeros added to make them all four characters long. Likewise for the values to be looked up. There is also code to not allow searches outside the table range. The actual search always starts in the middle of the range. I calculated that by adding the top and bottom values and dividing by two. For this demonstration, I chose to drop the fractional portion of the calculated pointer. This means the top-most array element can not be found. I believe that if the result is rounded up, the top-most value could be found, but the bottom-most element could not be found. The values in the table or array to be searched, and the search ranges should be set with this decision in mind. The main principle is embodied in this statement :
If the searched value is less than the array element, the top of the search range is set to the current value of x, otherwise the bottom of the search range is set to the current value of x. The search range is cut in half either way. Then the new range's midpoint is re-calculated, and a new comparison is made. The lookup value may not be found in the table. I checked for two consecutive comparisons to the same array element to establish a not found condition:
When a searched-for value is not found, returning a flag value is an appropriate action. This demonstration only prints an error message. Example 2: (dlirsrch.bas) This program is a more practical, real-world example. The binary search is written as a function. The table limit has to be passed to the function so that it can be used inside the function. I also chose to pass the bottom value of 1 each time, to avoid an assignment statement inside the function. The program first reads a file of records into an two dimension array (or table). The count of records added to the table becomes the top limit in the search:
The program then reads a data file, and calls the lookup function for every record After returning from the function, the program either writes an output record with the found value appended, or prints an error message. Within the function itself, the value of the function is set to null and is then used in a while-wend statement. The value of the function is set to the found value or a flag value. Either case ends the while-wend loop. This statement returns a real value if the search value is found in the table:
This statement returns a flag value if the search value is not found:
This statement cuts the search range in half:
If the only purpose of the binary search is to validate a value, then both the found and not-found values could be flags, and tested for appropriate action after being returned from the function. |
Code Snippets/Attachments posted in LBNews in November: | Back to the Top | |||||
I'm trying a new layout for this section. please give feedback. The new format includes the actual message submitted as opposed to my attempts to describe their content. Every message listed in these newsletters are a selection which I deem worth keeping for prosperity, if you know of other messages that are worth keeping and would like them listed in here then please send me the relevant info about the message; ie: the author,subject,date and a brief description of the message. Thank you.
|