Search found 6643 matches

by dodicat
Oct 17, 2020 18:47
Forum: General
Topic: FBIDE
Replies: 10
Views: 427

Re: FBIDE

Since you are on Linux Albert, why don't you use fbc Linux with geany ide or poseidon ide or similar?
by dodicat
Oct 17, 2020 14:30
Forum: General
Topic: FBIDE
Replies: 10
Views: 427

Re: FBIDE

I read somewhere that you should killall with wine.

$ wine myfile.exe

$ killall myfile.exe
by dodicat
Oct 17, 2020 8:24
Forum: Beginners
Topic: PUT# again
Replies: 7
Views: 174

Re: PUT# again

I usually do this for files. #Include "file.bi" function savefile(filename As String,p As String) as string Dim As long n=freefile If Open (filename For Binary Access Write As #n)=0 Then Put #n,,p Close Else Print "Unable to save " + filename:sleep:end End If return filename End ...
by dodicat
Oct 15, 2020 13:32
Forum: General
Topic: where's the library that was linked-in?
Replies: 8
Views: 213

Re: where's the library that was linked-in?

I have
C:\mingw64\lib\ with the bin folder on path which I use for things like gendef or ar and other bits and pieces.
The mingw64 is from the forum.
version gcc-8.1.0
But my fb is the 5.2 standalone, not on path.
What is
#inclib "msvcrt-os"
It is not found here??
by dodicat
Oct 15, 2020 9:04
Forum: Tips and Tricks
Topic: Poisson disk sampling
Replies: 3
Views: 185

Re: Poisson disk sampling

Thanks paul doe. I got it up and running OK A Poisson distribution example is frequently quoted as being the pattern of destruction caused by doodlebugs in London in WW2. I cannot argue with this, in fact I cannot dwell too long thinking about it. However another example often quoted is (cowpats in ...
by dodicat
Oct 15, 2020 8:37
Forum: General
Topic: where's the library that was linked-in?
Replies: 8
Views: 213

Re: where's the library that was linked-in?

It doesn't work with the standalone version.
You probably have one of the (FREEBASIC PACKAGES WITH ALTERNATE GCC VERSION) ??
by dodicat
Oct 14, 2020 19:44
Forum: General
Topic: I hate shell
Replies: 17
Views: 4924

Re: I hate shell

freebasic has an easy pipe method. Function Shellout(Byval s As String="") Byref As String Var f=Freefile Dim As String tmp Open Pipe s For Input As #f s="" Do Until Eof(f) Line Input #f,tmp s+=tmp+Chr(10) Loop Close #f Return s End Function dim rc as string rc = Shellout("d...
by dodicat
Oct 14, 2020 14:44
Forum: General
Topic: FBIDE
Replies: 10
Views: 427

Re: FBIDE

Hi Albert. I have been using fbide since fb began almost, I think you are the same. No problems like that on windows. Remember that quick run creates fbidetemp.bas and fbidetemp.exe. Do you check your fbide folder . . .FBIde0.4.6r4\FBIde0.4.6r4, this is where these two files will be if you quick run...
by dodicat
Oct 14, 2020 9:22
Forum: Windows
Topic: Graphics screens are not displayed in Windows 10 Japanese environment
Replies: 13
Views: 598

Re: Graphics screens are not displayed in Windows 10 Japanese environment

Here 64 bits fb is always GDI (UK) So you only have to deal with 32 bits. To do it with minimum code (including NOT loading fbgfx.bi) #if sizeof(integer)=4 '=32 bits screencontrol (103, "GDI") 'set driver name to GDI #endif screen 19 dim as string s screencontrol (9 ,s) 'get driver name dr...
by dodicat
Oct 13, 2020 13:07
Forum: General
Topic: Function String don't work if unicode BOM
Replies: 26
Views: 533

Re: Function String don't work if unicode BOM

You are right of course, mine is more for a wide stutterer, no disrespect to forum stutterers or wide-boys/girls intended.
by dodicat
Oct 13, 2020 12:43
Forum: General
Topic: Runtime error 12 when I try to quit my prog
Replies: 7
Views: 177

Re: Runtime error 12 when I try to quit my prog

Exit cannot be used as a variable, I don't understand why it exists in your code in that way. Notwithstanding that, whenever you screenunlock in a loop you must at least sleep 1, if you don't you are guaranteed a crash. An exception is a program halt: . . . screenunlock dim as string key key=input(1...
by dodicat
Oct 13, 2020 12:00
Forum: General
Topic: Function String don't work if unicode BOM
Replies: 26
Views: 533

Re: Function String don't work if unicode BOM

I think I would prefer function wstringA(k as long,w as wstring) as wstring ptr static as wstring * 10000 res for n as long=0 to 2*len(w)-2 res+=WString( k, Wchr(w[n]) ) next return @res end function print *WstringA(20, "текст ") sleep Result ттттттттттттттттттттееееееееееееееееееееккккккк...
by dodicat
Oct 13, 2020 8:48
Forum: General
Topic: Function String don't work if unicode BOM
Replies: 26
Views: 533

Re: Function String don't work if unicode BOM

caseih
There is a wstring() function.
From the .chm help

Code: Select all


Print WString( 4, 934 )         
Print WString( 5, WStr("Indeed") )   
sleep


 

Although I thought the ch_code should be ushort for wstring and ubyte for string, but they are both set at long.
by dodicat
Oct 13, 2020 8:41
Forum: Documentation
Topic: Wiki improvements
Replies: 540
Views: 96016

Re: Wiki improvements

I have adjusted the simple example
to
For n As udt=200000000000 To 200000000300
skipping out udt(~~)
Actually what confuses me (I have no rule of thumb for) is when to use
u=type<udt>(~)
u=type(~)
u=udt~)
u=(~)
u=~
At the moment I use trial and error to get the simlest (cleanest looking) way.
by dodicat
Oct 13, 2020 7:50
Forum: Documentation
Topic: Wiki improvements
Replies: 540
Views: 96016

Re: Wiki improvements

Everybody makes their own rule of thumb I reckon for any use of a computer language, especially tricky bits like overloaded for/next/step in fb. My rule of thumb is: The for/next/step bear no one to one relationship with the standard for/next/step loops for numerical iterators. Rather for/next/step ...

Go to advanced search