Search found 3835 matches
- May 03, 2024 21:36
- Forum: Sources, Examples, Tips and Tricks
- Topic: Symmetrical n-body problem
- Replies: 2
- Views: 40
Re: Symmetrical n-body problem
Interesting simulation although I don't understand the math. In numeric simulations it begins to become chaotic after a while due to small deviations (a numeric simulation is never exact). In the real world isn't it the same? We can't make or represent any infinitely exact measurements of any real w...
- May 03, 2024 21:27
- Forum: Beginners
- Topic: GETKEY error
- Replies: 3
- Views: 106
Re: GETKEY error
@Triopstor ...but this doesn't explain the "Error Encountered - Unknown Key" response from my computer. Got me there! I don't know why it works of my computer (and I guess type of keyboard?) and not on yours. I have found it visually useful to print out the numbers in hex when wanting to k...
- May 03, 2024 4:34
- Forum: Beginners
- Topic: GETKEY error
- Replies: 3
- Views: 106
Re: GETKEY error
@Triopstor
Probably need to read up the FreeBasic manual on GETKEY?
https://www.freebasic.net/wiki/FBWiki
This works for me with Windows11
Probably need to read up the FreeBasic manual on GETKEY?
https://www.freebasic.net/wiki/FBWiki
This works for me with Windows11
Code: Select all
dim as integer keyCode
DO
keyCode = GETKEY
print keyCode;
LOOP UNTIL keyCode =13 OR keyCode =32 OR keyCode = 15359
- Apr 29, 2024 7:00
- Forum: Sources, Examples, Tips and Tricks
- Topic: One Line Challenge!
- Replies: 19
- Views: 1520
Re: One Line Challenge!
mindlord Just for fun decided to write a program to translate one of your one line programs to a multiline version. One issue was the one line string contained inverted commas, loop until inkey()="q" changed to loop until multikey(&H01) The result is saved as multiLine3.bas which you c...
- Apr 29, 2024 5:05
- Forum: Sources, Examples, Tips and Tricks
- Topic: One Line Challenge!
- Replies: 19
- Views: 1520
Re: One Line Challenge!
mindlord You could possibly automate or semi automate the method? example: First I saved the expanded version given in my post as prog.txt Then used this code to load, convert and save it as a one line version as prog2.bas Dim As String file_name Dim As Integer file_num Dim as integer lineCount file...
- Apr 29, 2024 0:35
- Forum: Sources, Examples, Tips and Tricks
- Topic: One Line Challenge!
- Replies: 19
- Views: 1520
Re: One Line Challenge!
@mindlord wrote: "... but it's the spirit of the challenge as well." Yes I sometimes forget that. It is the human connectedness that competitions provide regardless of any practical outcome. I seem to lack that need instead concentrate on something of practical value which I find the most ...
- Apr 27, 2024 22:42
- Forum: Sources, Examples, Tips and Tricks
- Topic: One Line Challenge!
- Replies: 19
- Views: 1520
Re: One Line Challenge!
But aren't all programs one line in the computer memory? Isn't the colon the same as a CRLF? dim shared as long a=1,i,j=55,k,d,e,c,t,r,x,y,z,u,q=24,w=2,s=90,o=600,p=720,h=4,n,l,m dim v(55)as byte dim shared g as wstring*30 = "??z???D?????????????????a???" sub b(l as long,t as long,u as byt...
- Apr 21, 2024 8:01
- Forum: Community Discussion
- Topic: free Basic - just curious?
- Replies: 17
- Views: 1332
Re: free Basic - just curious?
@codeWrapped If wanting to write computer games is your goal you might want to consider what kind of games you want to write and on what platforms you want them to run when selecting a computer language. In the early years of FreeBASIC there were many games written but it has all but died out now. h...
- Apr 21, 2024 1:15
- Forum: Community Discussion
- Topic: free Basic - just curious?
- Replies: 17
- Views: 1332
Re: free Basic - just curious?
BASIC was my first language on my first computer the TRS80. The attraction I had for FreeBASIC 12 years ago was as a hobby programmer. FreeBASIC was easier to use and read than the C++ I had been using up to then and compiled to fast readable code and also came with innate graphics statements releva...
- Mar 22, 2024 19:06
- Forum: General
- Topic: screenres with a vertical scroll bar
- Replies: 16
- Views: 952
Re: screenres with a vertical scroll bar
@jaskin
You are good to go then with the PlanetSquires Forums to help?
You are good to go then with the PlanetSquires Forums to help?
- Mar 22, 2024 6:26
- Forum: General
- Topic: screenres with a vertical scroll bar
- Replies: 16
- Views: 952
Re: screenres with a vertical scroll bar
@jaskin I rather go to the source and use Win32 API calls directly. It depends on what you are programming and why. I spent time learning to use the Win32 API using C++ but found no advantage over using Visual Basic (at the time) with its GUI editor. I have always rolled my own GUI since the DOS day...
- Mar 12, 2024 22:23
- Forum: Sources, Examples, Tips and Tricks
- Topic: The Travelling Salesman Problem
- Replies: 21
- Views: 1327
Re: The Travelling Salesman Problem
@dodicat I wondered how well you could figure out the shortest path by visual inspection. The human eye is very good at clustering. So I modified your code as I was too lazy to write my own version hope you don't mind. I added a function drawLine() so by clicking each point you could join them up wi...
- Mar 09, 2024 19:36
- Forum: Sources, Examples, Tips and Tricks
- Topic: The Travelling Salesman Problem
- Replies: 21
- Views: 1327
Re: The Travelling Salesman Problem
Both the circle and nearest town algorithms get pretty good results.
- Mar 09, 2024 17:28
- Forum: Sources, Examples, Tips and Tricks
- Topic: The Travelling Salesman Problem
- Replies: 21
- Views: 1327
Re: The Travelling Salesman Problem
@dodicat Many years ago (1984), my late wife and myself and our small dog took a long Summer break in our towing caravan. We ended up near London, and parked up in a site by the edge of Epping forest. My wife got a temporary job, at her trade as bookkeeper, in Woodford Green, I took a job as a milkm...
- Mar 09, 2024 0:03
- Forum: Sources, Examples, Tips and Tricks
- Topic: The Travelling Salesman Problem
- Replies: 21
- Views: 1327
Re: The Travelling Salesman Problem
I have modified Lothar Schirm's code to having a fixed number of towns and when the program is exited the town locations are saved as data statements in townsData.bas to be copied pasted into another version which reads the locations rather than making a new random selection. This data set can be us...