## Search found 7321 matches

Jul 23, 2019 17:52
Forum: General
Topic: Squares
Replies: 6745
Views: 384510

### Re: Squares

Don't waste my time ;-) At timestamp T where v1 was build v1 is the value of bit 2,1,0 At timestamp T where v2 was build: v2 is the value of bit 7,8,5,4 (shifted to right) v1 nor v2 knows nothing about bit 3 was it set or clear at timestamp T ! Again the information of bit 3 at timestamp T are lost ...
Jul 23, 2019 16:41
Forum: Documentation
Topic: Is the docu about variadic argument in #define or #macro complete ?
Replies: 5
Views: 105

### Re: Is the docu about variadic argument in #define or #macro complete ?

Aaaaaaahhhhhhhh I got it :-)

Thank very much.

Joshy
Jul 23, 2019 11:16
Forum: Documentation
Topic: Is the docu about variadic argument in #define or #macro complete ?
Replies: 5
Views: 105

### Re: Is the docu about variadic argument in #define or #macro complete ?

@fxm this is clear in your example arg1 and arg2 have names to compare with something
but if you call your example test(5, 6, 7, 8)
arg1 = 5, arg2 = 6, 7 and 8 does not have any name ?
How do you can compare the optional arguments with an empty string ?

Thank you

Joshy
Jul 23, 2019 7:54
Forum: Documentation
Topic: Is the docu about variadic argument in #define or #macro complete ?
Replies: 5
Views: 105

### Is the docu about variadic argument in #define or #macro complete ?

I read the page about variadic arguments but I don't get it, is something missing or I'm blind ?

How to get the number of "optional" passed arguments ?

I mean how to test if an "optional" argument exist in a #macro or #define declaration ?

Thank you.

Joshy
Jul 23, 2019 6:40
Forum: Beginners
Replies: 3
Views: 87

If you use the counter as an array index and counter is by default zero then you have to increment the counter after redim and storing the value ! dim as string array() dim as integer counter ' is 0 for i as integer = 0 to 9 ' 10 items redim preserve array(counter) ' no + 1 array(counter)=str(i) : c...
Jul 23, 2019 1:52
Forum: General
Topic: Squares
Replies: 6745
Views: 384510

### Re: Squares

I don't understand your sentence !

if you will isolate any bit from a number you build a mask

v = n1 and &B0000100 read only bit 3 from the number
v = n1 and &B11110111 isolate bit 3 from a number

Joshy
Jul 23, 2019 1:41
Forum: General
Topic: Squares
Replies: 6745
Views: 384510

### Re: Squares

again you lost bit 3 Joshy screen 19 dim as longint n1 , v1 , v2 , ans for a as longint = 0 to 255 n1 = a v1 = n1 mod 16 ' <--- !!! bit 3 was missing !!! v2 = n1 \ 16 ans = v1 + ( 16 * v2 ) print n1 , v1 , v2 , ans if a mod 16 = 0 then sleep if inkey = chr(27) then exit for next sleep
Jul 23, 2019 1:36
Forum: Windows
Topic: Set up FB on Windows 10 to run old programs?
Replies: 3
Views: 85

### Re: Set up FB on Windows 10 to run old programs?

I use Windows 10 64-bit and FBIDE and geany without any problems. After I extract FreeBASIC 32-bit and FreeBASIC 64-bit *.zip files I rename fbc.exe and copy both folders to d:\FreeBASIC The result are: D:\FreeBASIC\bin\libexec\gcc\x86_64-w64-mingw32\ D:\FreeBASIC\bin\libexec\gcc\i686-w64-mingw32\ D...
Jul 23, 2019 1:29
Forum: Libraries
Replies: 279
Views: 34664

Can't test it ATM I'm not at home,
but don't hard code any path or name of FreeBASIC !

Let the user select it's path and fbc file and safe it in a Fl_Preferences file.

Joshy
Jul 23, 2019 1:10
Forum: General
Topic: Squares
Replies: 6745
Views: 384510

### Re: Squares

How would you get n1 back , out of the v1 and v2 ??? Really ? The answer is never ! v1 = (n1 and &b00000111) v2 = (n1 and &b11110000) shr 4 Where is bit 3 ? Or with other words you don't encode bit 3 and this information are lost for ever in space and time :-) May be it's a typo and you mea...
Jul 23, 2019 0:32
Forum: Game Dev
Topic: The 50 years ago moon landing 4K contest!
Replies: 0
Views: 67

### The 50 years ago moon landing 4K contest!

The 50 years ago moon landing 4K contest ! (sorry about my bad written English) 50 years ago I was 5 years old and saw it on a black and white TV in Germany I was a tiny child but it was clear for me something special is going on :-) (A night in front of an TV as a child what a unique exception!) I...
Jul 22, 2019 22:53
Forum: Beginners
Topic: Why wrong length of array
Replies: 8
Views: 135

### Re: Why wrong length of array

you don't need len(array) use ubound(array) instead. Len() VS. UBound() Joshy Public Sub Split(Text As String, Delim As String = " ", Count As Long = -1, Ret() As String) Dim As Long x, p If Count < 1 Then Do x = InStr(x + 1, Text, Delim) p += 1 Loop Until x = 0 Count = p -...
Jul 22, 2019 19:22
Forum: Tips and Tricks
Topic: Visual Sort
Replies: 6
Views: 463

### Re: Visual Sort

good job

Joshy

My favorite on YouTube: 15 Sorting Algorithms in 6 Minutes (with sound)

Homepage: The Sound of Sorting
Jul 22, 2019 19:02
Forum: General
Topic: Let us talk about memory layout of classes Microsost C++ vs gnu g++ vs FreeBASIC !
Replies: 4
Views: 164

### Re: Let us talk about memory layout of classes Microsost C++ vs gnu g++ vs FreeBASIC !

Jul 22, 2019 12:02
Forum: Documentation
Topic: Hello fxm :-) => for updating the ASM documentation page on wiki
Replies: 15
Views: 838

### Re: Hello fxm :-) => for updating the ASM documentation page on wiki

@SARG it's better do it late as never, thank you :-)

Joshy