Search found 5526 matches

by dodicat
Jan 30, 2019 0:31
Forum: Beginners
Topic: Shaped Window with mouse area problem
Replies: 8
Views: 253

Re: Shaped Window with mouse area problem

Looks good Forgotten Coder. I had a bash myself, but got confused along the way and now I move the mouse by the window. type point as integer x,y end type Sub drawpolygon(p() As Point,Byref col As Ulong,Byref c As Point=type(0,0)) Dim k As Long=Ubound(p)+1 Dim As Long index,nextindex Dim As Long cx,...
by dodicat
Jan 30, 2019 0:15
Forum: Tips and Tricks
Topic: Some Bezier curve drawing
Replies: 25
Views: 834

Re: Some Bezier curve drawing

A nadir in numerical analysis. screen 20 or 19 Screen 20,32 Dim Shared As Integer xres,yres Screeninfo xres,yres Type Point As Single x,y,z End Type Type particle As Point position,velocity End Type #define incircle(cx,cy,radius,x,y) (cx-x)*(cx-x) +(cy-y)*(cy-y)<= radius*radius #define vct Type<Poin...
by dodicat
Jan 28, 2019 19:11
Forum: Windows
Topic: Win10 -- Win7 ; same program big time diff
Replies: 4
Views: 147

Re: Win10 -- Win7 ; same program big time diff

my results Win 10 dim as longint n = 1000*100' 1000*200 redim as longint array(n) for z as long=0 to n array(n)=rnd * 1000000 next dim as longint i,j dim as long counter dim as double t=timer for i = 1 to n-1 for j = i+1 to n if array(i)=array(j) then counter+=1 ' checking separation points in a arr...
by dodicat
Jan 28, 2019 18:34
Forum: Beginners
Topic: Unicode and files
Replies: 6
Views: 214

Re: Unicode and files

The problem is the open keyword I believe. ascii only. As you say the crt can handle unicode filenames and unicode content. But I have not tested this code on Linux, perhaps Linux fopen can do the job. I shall try later. For this I must use Poseidon ide or direct load to wordpad, all others ides fai...
by dodicat
Jan 28, 2019 0:35
Forum: Tips and Tricks
Topic: Some Bezier curve drawing
Replies: 25
Views: 834

Re: Some Bezier curve drawing

Here are TT's points with Windows Bezier on a gfx screen. At last I have found a place for screensync. If you don't like TT's points you can drag them around. As usual, crap on 64 bits, so I choose -gen gas. Thank you UEZ. screen 19,32 color,rgb(255,255,255) dim as integer xres,yres screeninfo xres,...
by dodicat
Jan 27, 2019 19:56
Forum: General
Topic: Undefined Reference on just declarations
Replies: 12
Views: 351

Re: Undefined Reference on just declarations

Strange how you can set a fixed length array (not using redim or any in the creation), but re dimension it anytime. Type T Declare Constructor () x As Integer End Type constructor T print "hi" end constructor Type TList static as integer x list(1 to x) As T End Type dim as integer TList.x=...
by dodicat
Jan 27, 2019 16:46
Forum: Tips and Tricks
Topic: Some Bezier curve drawing
Replies: 25
Views: 834

Re: Some Bezier curve drawing

A quadratic curve would use a polynomial degree 2 to approximate a*x^2 +b*x +c The cubic would use degree 3 k*x^3 +a*x^2 +b*x +c The splines in my code are cubic (t instead of x) Here is an example of a quadratic curve going through three points. Sub GaussJordan(matrix() As Double,rhs() As Double,an...
by dodicat
Jan 27, 2019 16:03
Forum: General
Topic: Undefined Reference on just declarations
Replies: 12
Views: 351

Re: Undefined Reference on just declarations

You have declared a constructor but no body.
Either a fully functioning constructor or none kills the error.

Code: Select all



Type T
    Declare Constructor ()
    x As Integer
End Type

constructor T
end constructor
print "hi"

Type TList
    list(Any) As T
End Type
sleep
 
by dodicat
Jan 27, 2019 13:24
Forum: Windows
Topic: [some OT] questions on DLL(Dynamic library)
Replies: 7
Views: 286

Re: [some OT] questions on DLL(Dynamic library)

I have also searched in the past for this (and quite recently for a freepascal project). Also that site. I was toying with the download anyway without getting the license, I might try it on my old XP box, but not here on win 10. You can use an alias name for your function, but you should call the dl...
by dodicat
Jan 27, 2019 12:15
Forum: Tips and Tricks
Topic: Some Bezier curve drawing
Replies: 25
Views: 834

Re: Some Bezier curve drawing

Using windows and TT's points. #Include "windows.bi" dim as point pts(7)={(10,10),(80,40),(40,190),(190,50),(100,170),(180,170),(100,0),(0,0)} var k=3.5 'blow up a bit for n as long=0 to 7 pts(n).x=k*pts(n).x pts(n).y=k*pts(n).y next n var Main_Win=CreateWindowEx(0,"#32770","...
by dodicat
Jan 27, 2019 1:00
Forum: Tips and Tricks
Topic: Some Bezier curve drawing
Replies: 25
Views: 834

Re: Some Bezier curve drawing

Thanks TT Compare with catmull rom in 3D Type Point As long x,y,z End Type #define Intrange(f,l) int(Rnd*(((l)+1)-(f))+(f)) #define map(a,b,x,c,d) ((d)-(c))*((x)-(a))/((b)-(a))+(c) function bspline(p() as point, byval t as single) as point '3D bezier dim as single w=1-t return type<point> _ (p(2).x*...
by dodicat
Jan 25, 2019 16:09
Forum: Tips and Tricks
Topic: Dedication check.
Replies: 8
Views: 390

Re: Dedication check.

My gcc's all tell me: This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. I would have said DON'T LOOK A GIFT HORSE IN THE MOUTH, or something equally as subtle, and not degraded my work to NOT FIT FOR ...
by dodicat
Jan 23, 2019 23:11
Forum: Beginners
Topic: How to add null characters?
Replies: 9
Views: 229

Re: How to add null characters?

The string function is also overloaded.

Code: Select all

print string(10,48)+string(10,0) + string(10,49)
sleep
by dodicat
Jan 23, 2019 21:19
Forum: Beginners
Topic: How to add null characters?
Replies: 9
Views: 229

Re: How to add zero characters?

Make up a little function for the task. Function SAR(s0 As String,search As String,replace As String) As String Dim s As String=s0 var position=Instr(s,search) While position>0 s=Mid(s,1,position-1) & replace & Mid(s,position+Len(search)) position=Instr(position+Len(replace),s,search) Wend S...
by dodicat
Jan 22, 2019 14:45
Forum: Community Discussion
Topic: Still alive?
Replies: 3
Views: 291

Re: Still alive?

The compiler hasn't been updated since Jan 2016.
There are various internal updates used by some members but it is confusing, so I still use the 2016 build.
I believe a new official build is due soon.

Go to advanced search