Search found 1023 matches

by jevans4949
Apr 06, 2016 16:35
Forum: General
Topic: How can I close this file (and only this one)?
Replies: 18
Views: 1303

Re: How can I close this file?

Code: Select all

Dim xfileno As Integer
xfileno = FreeFile
Open "xfile.txt" For Output As #xfileno
Print #xfileno, "Hello, World"
Close #xfileno
by jevans4949
Feb 25, 2016 11:24
Forum: Community Discussion
Topic: Do you mind if ignoring ";"?
Replies: 13
Views: 1591

Re: Do you mind if ignoring ";"?

Colon (:) is used as a multi-statement seperator in Basic. Just did a litlle experiment, and Freebasic doesn't require that there be a statement after the colon. You could try replacing all semicolons with a colons in the patched-in code.
by jevans4949
Jan 14, 2016 3:33
Forum: General
Topic: A Shakespearian issue...
Replies: 6
Views: 597

Re: A Shakespearian issue...

The qwerty keyboard layout was designed to prevent the mechanical keys of the original typewriters from jamming when used by fast typists. The layout is therefore not optimal for systems with no moving parts. The article "QWERTY" on EnglishWikipedia does give some history of this. Anybody ...
by jevans4949
Dec 23, 2015 16:56
Forum: Community Discussion
Topic: esoteric language LOLCODE
Replies: 5
Views: 994

Re: esoteric language LOLCODE

Well, I guess the authors of both of these were just doing it for fun "because they could". Hmmm ... so instead of "if a=b then ..." you coud put " if a<>b then dont ..."? An operator "roughly" could be useful for floating-point numbers. "if a roughly b t...
by jevans4949
Dec 21, 2015 1:44
Forum: Community Discussion
Topic: esoteric language LOLCODE
Replies: 5
Views: 994

Re: esoteric language LOLCODE

Mentioned it to my daughter's boyfriend and he said it reminded him of Dogescript: https://dogescript.com/
by jevans4949
Dec 18, 2015 22:30
Forum: Community Discussion
Topic: esoteric language LOLCODE
Replies: 5
Views: 994

Re: esoteric language LOLCODE

I remember reading an article years ago about how somebody hacked the BASIC interpreter on the Tandy TRS-80 (shows my age!) to replace all the keywords with a French equivalent. The code was interpeted, but keywords were stored internally as integers, so it worked perfectly. To make it more friendly...
by jevans4949
Nov 15, 2015 16:03
Forum: Community Discussion
Topic: [offtopic] Any organ player here ?
Replies: 2
Views: 1271

Re: [offtopic] Any organ player here ?

Just checked UK Ebay; several Kawai organs looking about the same age on sale for less than 100 GBP (although not the model in your picture). Problem is that it's old technology, and many people won't have space in their homes. Yours may have been dumped by somebody clearing an elderly relative's ap...
by jevans4949
Sep 26, 2015 13:30
Forum: Community Discussion
Topic: second rnd sequence
Replies: 8
Views: 1531

Re: second rnd sequence

@St_W: Your suggestion is good, and could also be thread-safe. One would probably want to set up a class for the state variable(s?), with the data specified as private, to discourage VW programmers from poking it.
by jevans4949
Sep 26, 2015 10:58
Forum: Community Discussion
Topic: second rnd sequence
Replies: 8
Views: 1531

Re: second rnd sequence

@MichaelW: This is not what the OP is looking for. What he wants is to be able to generate two random number series at the same time. Precisely why, I don't know. The obvious solution is to modify the static variables of the existing random number generators to arrays of some finite size, and modify...
by jevans4949
Sep 19, 2015 22:20
Forum: Community Discussion
Topic: Hello Admin I use this forum as guest since 1970 !!!
Replies: 6
Views: 1110

Re: Hello Admin I use this forum as guest since 1970 !!!

Isn't that the zero time for the Unix clock? Thought that didn't loop round until 2035 sometime?
by jevans4949
Aug 10, 2015 21:38
Forum: General
Topic: Ancestors
Replies: 5
Views: 750

Re: Ancestors

Of course, it doesn't allow for the fact that in small communities people marry (sometimes distant) cousins, so the further back you go, there is more chance of duplication. I thought I read recently that 9% of men in Asia are descended from Genghis Khan. Also, someone did some genetic research on a...
by jevans4949
Jul 26, 2015 7:40
Forum: General
Topic: Making compact number representation
Replies: 13
Views: 1276

Re: Making compact number representation

You may be interested in the variable-length integer format used by MIDI files. This is a big-endian format, with 7 bits of data and the senior bit set on if there are more bytes to follow. The following decodes one to an integer. '********************************************************************...
by jevans4949
Jul 26, 2015 6:57
Forum: Community Discussion
Topic: FB1.03.0-win32 Seg Violation
Replies: 3
Views: 791

Re: FB1.03.0-win32 Seg Violation

Somebody else can explain the compiler error ... You can't (apparently) stop Microsoft adding new identifiers to the Windows api. When I started programming, each project the organisation worked on had a two-letter project code, and all identifiers had to begin with that. Each project had sub-projec...
by jevans4949
Jul 26, 2015 6:12
Forum: Community Discussion
Topic: Downside of using FreeBASIC
Replies: 17
Views: 2320

Re: Downside of using FreeBASIC

This is always a problem for any large organisation which develops projects using "niche" languages. It's why IBM is still able to sell hardware; banks and other large businesses have invested millions in applications developed in its assembler and language dialects over 50 years, and can'...
by jevans4949
Jul 25, 2015 22:31
Forum: Beginners
Topic: Name
Replies: 7
Views: 965

Re: Name

IMO, it's best to avoid using as a variable name anything that MIGHT be, or become, a keyword. So call your variable xname, or pname, or something like that.

Go to advanced search