Search found 5519 matches

by dodicat
Feb 09, 2019 18:52
Forum: Beginners
Topic: How to reset the value when using input
Replies: 22
Views: 406

Re: How to reset the value when using input

The inkey page needs fixing for the coming version 1.06 They are all inkey$ at the moment. (I cannot do it, I am not on the long list). My swansong here, clearbuffer+ function clearbuffer() as string dim as string tot,char=chr(0) while char<>"" char=inkey tot+=char wend return tot end func...
by dodicat
Feb 09, 2019 17:08
Forum: Beginners
Topic: How to reset the value when using input
Replies: 22
Views: 406

Re: How to reset the value when using input

Another method(windows) Linux is read I think #macro clearbuffer() While Inkey <> "" Wend #endmacro #define emptybuffer shell("pause >nul") print "Press a few keys (you have five seconds) .." sleep 5000,1 print "Now press a key to continue . . ." emptybuffer p...
by dodicat
Feb 09, 2019 16:41
Forum: Beginners
Topic: How to reset the value when using input
Replies: 22
Views: 406

Re: How to reset the value when using input

That way is standard (I think because of habit more than reason IMO) But inkey clears the buffer itself by definition anyway. ... Peeks into the keyboard buffer and returns a String representation of the first character, if any, found. The key is then removed from the buffer .. print "Press a k...
by dodicat
Feb 09, 2019 16:25
Forum: Beginners
Topic: How to reset the value when using input
Replies: 22
Views: 406

Re: How to reset the value when using input

Another possible method to clear the keyboard buffer.

Code: Select all



    dim as function() as string clearbuffer=@inkey()
   


print "Press a key to continue .."

sleep
clearbuffer()

print "len inkey = ";len(inkey)

print "Press a key to end .."

sleep
 
by dodicat
Feb 09, 2019 15:05
Forum: Beginners
Topic: How to reset the value when using input
Replies: 22
Views: 406

Re: How to reset the value when using input

I wonder how many ways there are to clear the keyboard before continuing?
Here is another method.

Code: Select all

print "press a key to continue"

 (input(1))


print "Inkey = ";inkey


print "Press a key to end"
sleep 
by dodicat
Feb 08, 2019 20:59
Forum: Windows
Topic: Windows Button Image
Replies: 25
Views: 490

Re: Windows Button Image

I tweaked the code a little. (My bitmap is 350 by 150) #include once "windows.bi" sub getsize(picture as string,byref dimensionx as long,byref dimensiony as long) Open picture For Binary access read As #1 Get #1, 19, dimensionx Get #1, 23, dimensiony Close #1 end sub DIM szBitmap AS STRING...
by dodicat
Feb 08, 2019 15:30
Forum: Tips and Tricks
Topic: Image Painting Demos [Windows only]
Replies: 22
Views: 626

Re: Image Painting Demos [Windows only]

Try it again TT, I have just edited the code.
by dodicat
Feb 08, 2019 15:16
Forum: Tips and Tricks
Topic: Image Painting Demos [Windows only]
Replies: 22
Views: 626

Re: Image Painting Demos [Windows only]

If you are in program files (or the French version), perhaps you'll need double quotes all round. Sub savefile(filename As String,p As String) Dim As Integer n n=Freefile If Open (filename For Binary Access Write As #n)=0 Then Put #n,,p Close Else Print "Unable to save " + filename End If ...
by dodicat
Feb 08, 2019 14:47
Forum: Tips and Tricks
Topic: Image Painting Demos [Windows only]
Replies: 22
Views: 626

Re: Image Painting Demos [Windows only]

Try this TT (another download method) (Longer time than UEZ's download) Let it run it's course. Sub savefile(filename As String,p As String) Dim As Integer n n=Freefile If Open (filename For Binary Access Write As #n)=0 Then Put #n,,p Close Else Print "Unable to save " + filename End If En...
by dodicat
Feb 08, 2019 13:26
Forum: Beginners
Topic: Matrix to string
Replies: 15
Views: 207

Re: Matrix to string

Double check. view end of the string this time. #include "crt/string.bi" 'needed for memcpy #include "file.bi" dim shared mfile as string mfile="matrixdata.txt" #define K_VALUE 10000 'can be increased for more speed function clip_string_uni_matrix(z() as double) as stri...
by dodicat
Feb 08, 2019 11:34
Forum: Tips and Tricks
Topic: Image Painting Demos [Windows only]
Replies: 22
Views: 626

Re: Image Painting Demos [Windows only]

Thanks UEZ.
We need more like you and your second picture on this forum.
by dodicat
Feb 08, 2019 11:07
Forum: Beginners
Topic: Matrix to string
Replies: 15
Views: 207

Re: Matrix to string

Straight to file is fast. #include "file.bi" dim shared clips as string dim shared mfile as string mfile="matrixdata.txt" sub clip_string_uni_matrix (Z() As Double) ' converts matrix to clips string variable, which is global ' terminate with CRLF, also the last line Dim As Intege...
by dodicat
Feb 06, 2019 21:24
Forum: General
Topic: gmp 6.1.2 and mpfr 4.0.2
Replies: 19
Views: 2407

Re: gmp 6.1.2 and mpfr 4.0.2

Thanks srvaldez.
Downloaded, I'll give it a run later.
by dodicat
Feb 05, 2019 13:54
Forum: Documentation
Topic: Windows bug for small screens / fullscreen
Replies: 24
Views: 565

Re: Documentation of PMAP function

With 32 bits -gen gcc or gas the screen is drawn as is 129 by 100 if set for 100 by 100. A white line doesn't show. I tested on fb .24 as well as the latest official (1.05) build. A good find TT. I think all graphics bugs should be resolved in fb, gfx graphics are fb's main strength. I have no idea ...
by dodicat
Feb 04, 2019 20:58
Forum: Documentation
Topic: Windows bug for small screens / fullscreen
Replies: 24
Views: 565

Re: Documentation of PMAP function

It looks OK with 32 bits, but it behaves badly also in a different way. (1.05) screenres 100,100,32 color , rgb(200,0,0) dim as integer mx,my do getmouse mx,my screenlock cls line(0,0)-(99,99) locate 1,1 print mx;my screenunlock sleep 1 loop until len(inkey) sleep

Go to advanced search