Search found 1025 matches

by jevans4949
Apr 21, 2016 1:16
Forum: General
Topic: What are the pitfalls of using ASM for speed improvements?
Replies: 23
Views: 1420

Re: What are the pitfalls of using ASM for speed improvements?

To save re-calculating the array index, you could set a pointer to the relevant array element at the start of each iteration of your loop If you just want to step through 2 million pixels and row and column are irrelevant, you could just increment the pointer by 1 at each iteration, stopping when th...
by jevans4949
Apr 06, 2016 19:37
Forum: General
Topic: How can I close this file (and only this one)?
Replies: 18
Views: 1495

Re: How can I close this file (and only this one)?

@Tourist Trap: Is there a reason you can't use a global variable to store the file number you used?

If it's the case that your program is going to be opening files in an unpredictable way, there are a number of ways of dealing with this. Perhaps you could clarify?
by jevans4949
Apr 06, 2016 16:35
Forum: General
Topic: How can I close this file (and only this one)?
Replies: 18
Views: 1495

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: 1780

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: 648

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: 1079

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: 1079

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: 1079

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: 1319

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: 1686

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: 1686

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: 1159

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: 789

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: 1452

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: 853

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...

Go to advanced search