Search found 1025 matches

by jevans4949
Jul 27, 2018 0:51
Forum: General
Topic: Big Endian -> Little Endian
Replies: 17
Views: 2075

Re: Big Endian -> Little Endian

... but I've never heard of a 3-byte integer ... The MIDI fie specification includes one instance of 3-byte integer, and also wierd variable-length integers - lower 7 bits of each byte are data and top bit indicates another byte follows - e.g &h'8307' decodes to &h'0187'. All integers are b...
by jevans4949
Jul 26, 2018 23:38
Forum: General
Topic: Big Endian -> Little Endian
Replies: 17
Views: 2075

Re: Big Endian -> Little Endian

jj2007 has the simplest answer for Singles or 4-byte integers - well done! My code contains solutions for 2- and 3-byte signed and unsigned integers. Note, however, that my code assumes a 32-bit compile - assumes sizeof(integer) and sizeof(pointer), and does not include 64-bit integers at all. Obvio...
by jevans4949
Jul 24, 2018 21:18
Forum: General
Topic: Big Endian -> Little Endian
Replies: 17
Views: 2075

Re: Big Endian -> Little Endian

Some stuff I wrote a while back, using asm. (To do with MIDI files) '*********************************************************************** ' Big-endian integer Handling '*********************************************************************** #include once "jevans4949/bigend/bigend.bi" '*...
by jevans4949
Jul 04, 2018 11:30
Forum: General
Topic: Specifying Default Arrays on Function Headers
Replies: 2
Views: 440

Re: Specifying Default Arrays on Function Headers

Thanks, @sancho3, I'll give it a spin. (My example was simplified).)
by jevans4949
Jul 03, 2018 23:07
Forum: General
Topic: Specifying Default Arrays on Function Headers
Replies: 2
Views: 440

Specifying Default Arrays on Function Headers

Is dementia setting in? The following code compiles OK Dim x(0 To 255) As LongInt Function y (z As Long, a() As LongInt) As Integer Function = 0 End Function The following throws error 58: Illegal specification, at parameter 2 (a) of y() in 'Function y ... Dim x(0 To 255) As LongInt Function y (z As...
by jevans4949
Jun 01, 2018 0:15
Forum: General
Topic: starting a project - freeBasic to create games for a university honours course in visual arts.
Replies: 5
Views: 783

Re: starting a project - freeBasic to create games for a university honours course in visual arts.

Suggest you contact Justin Bohemier via his web site and ask whether he is willing to work with you. He may even be willing to share the source code with you, but even if he does it will be probably mean a lot of work, after a lot of learning on your part. Only saw Donkey Kong when my kids were play...
by jevans4949
May 25, 2018 15:36
Forum: Community Discussion
Topic: Is this a bug or am I crazy?
Replies: 29
Views: 3360

Re: Is this a bug or am I crazy?

For the while statement,I suppose hopefully the progammer would eventually clock that i will always be less that i+5 ! I suppose with the for statement, maybe we ought to document that the iterator will be set to the startvalue before the endvalue is computed, and any use of the iteraor in the compu...
by jevans4949
May 25, 2018 2:37
Forum: Community Discussion
Topic: Is this a bug or am I crazy?
Replies: 29
Views: 3360

Re: Is this a bug or am I crazy?

The fact that C runs into a loop is not illogical; the expressions in a for statement can be anything - not necesarily a loop control. Expression 2 is just evaluated at the bottom of the loop. Other languages ususally direct you that all the expressions (other than incrementing the loop counter and ...
by jevans4949
May 20, 2018 15:57
Forum: Beginners
Topic: How write a calculate average monthly sales program
Replies: 3
Views: 820

Re: How write a calculate average monthly sales program

You need to provide more information. What is the format of your input data?

Short answer is that you add up 12 monthly totals and divide by 12.
by jevans4949
May 01, 2018 23:47
Forum: Community Discussion
Topic: Rewriting code from scratch
Replies: 8
Views: 1944

Re: Rewriting code from scratch

It largely depends on whether the programmer(s) amending the code understand the mindset of the original coder. I once wrote a macro in IBM assembler to print out the contents of a mainfile record, with the field name and the data printed according to type (bit, binary, decimal, character) and lengt...
by jevans4949
Mar 17, 2018 1:43
Forum: Community Discussion
Topic: FreeBASIC and the Raspberry Pi ?
Replies: 69
Views: 10303

Re: FreeBASIC and the Raspberry Pi ?

Thank you all for your responses which I can refer to when I start trying to get it all going. Still have to buy a monitor and HDMI cable. . You may find it easier / cheaper to buy a second-hand TV with an HDMI socket. You also get a spare TV set. If in the UK, rush to your local Maplin store for t...
by jevans4949
Nov 25, 2017 23:34
Forum: Beginners
Topic: Copy FB .csv file to Base table
Replies: 3
Views: 3265

Re: Copy FB .csv file to Base table

Don't know if it helps, but you can covert a whole .csv file into a new LIbre-Office table. From the Libre-Office Menu bar select File/New/Database; on the popup screen, select the 3rd button - "Connect to existing database, and select "Spreadsheet" from the menu box below it. But the...
by jevans4949
Oct 28, 2017 23:33
Forum: General
Topic: A True False conundrum [Solved]
Replies: 19
Views: 1653

Re: A True False conundrum [Solved]

There's a book with Terry Pratchett as co-author which has the introduction:

This is a true account of the life of William Shakespeare.
But only for certain values of True.
by jevans4949
Oct 28, 2017 17:34
Forum: General
Topic: A True False conundrum [Solved]
Replies: 19
Views: 1653

Re: A True False conundrum [Solved]

I occasionally get a warning that I may be cracking up and these warnings are more common than ever they used to be. Needless to say that I am pleased to learn that on this occasion it was a false positive. <Ha,ha> You don't have to be mad to use FreeBasic, but it helps! The Boolean type is a relat...
by jevans4949
Oct 28, 2017 15:29
Forum: General
Topic: A True False conundrum [Solved]
Replies: 19
Views: 1653

Re: A True False conundrum

Sub Test() Static As Boolean FirstInstance = TRUE Print CUByte(firstinstance) Print CUByte(TRUE) If FirstInstance Then Print "First Instance" FirstInstance = False Else Print "Second Instance" firstinstance = true End If End Sub Test Test Test Sleep If you run the above, it appe...

Go to advanced search