Search found 64 matches

by Bunuel66
Jun 25, 2007 12:16
Forum: General
Topic: true/false?
Replies: 12
Views: 2626

True/False

Well, it's not only syntactic sugar as long as your consider Boolean values as a type. It can be usefull for avoiding logical errors in programming. Ultimately any data is just a stream of 0 and 1. Type is what make a semantic difference. Then , I would be very glad to see such type introduced in FB...
by Bunuel66
Apr 11, 2007 10:50
Forum: General
Topic: Lib of object
Replies: 9
Views: 2530

Lib of Objects

Thank's for all your answers, but I didn't found in the documents you mentionned any reference to including objects in a lib. If guru of OO in FB can point to such a reference....

Regards.

Luis
by Bunuel66
Apr 10, 2007 21:55
Forum: General
Topic: Lib of object
Replies: 9
Views: 2530

OOP or not OOP....

If I'm not mistaken, OOP is at least partially implemented in 0.17, object constructs work. Wiki says it also.

Regards

Luis
by Bunuel66
Apr 10, 2007 20:27
Forum: General
Topic: Lib of object
Replies: 9
Views: 2530

Lib of object

First, I apologize if that question has been already answered. I'm just playing a bit with the object features and I'm trying to build a Dll containing an object and its methods (functions). I have built some dll previously without OO stuff and it was working ok. Now it seems that the compiler (v1.1...
by Bunuel66
Apr 04, 2007 18:22
Forum: General
Topic: Extremely slow FB
Replies: 16
Views: 4619

Number Cruntching

Would you post your code, or at least the main loop? I tend to use FB or FP for numbers cruntching and they are equally fast (really fast;-). In any case It is allways advisable not to mix screen output and computation loop. I usually store the results in an array and display them after computations...
by Bunuel66
Feb 05, 2007 13:22
Forum: Tips and Tricks
Topic: MARS Encrytion Algorithm
Replies: 12
Views: 7804

Ciphers

For those interested:
http://csrc.nist.gov/CryptoToolkit/aes/ ... round2.htm

Beware that the key length is not in itself a good indicator of cipher robustness.....

Regards.

Luis
by Bunuel66
Dec 11, 2006 20:49
Forum: General
Topic: Calculating Area of an abstract polygon
Replies: 9
Views: 2101

Laughing.....

Well, the expression with coordinates is exactly the result of applying a succession of cross products when the plane of the polygon is part of the reference frame. Let's say that this expression is restricted in 2D. If the polygon is defined as supported by an arbitrary plane in a 3D space, then th...
by Bunuel66
Dec 11, 2006 10:21
Forum: General
Topic: Calculating Area of an abstract polygon
Replies: 9
Views: 2101

POlygon area

For computing the area of a triangle you can also use a cross product.
If U and V are two vectors of your triangle and A the area:
A=1/2(UxV) where x is the cross product operator.
It avoids using the square root operator and computing the elementary lengths.

Regards

Luis
by Bunuel66
Dec 10, 2006 20:45
Forum: General
Topic: Calculating Area of an abstract polygon
Replies: 9
Views: 2101

Area of an abstract polygon

If I understand your question as the area of a planar polugon build on an arbitrary set of points, I would define a central point as the barycentric of all the ones defining the polygon (ie the average of all the points). Then, from that point I will divide the polygon in a set of traiangles for who...
by Bunuel66
Dec 08, 2006 16:55
Forum: General
Topic: Function pointer
Replies: 3
Views: 1265

Function pointer

See also:

http://www.freebasic.net/forum/viewtopi ... highlight=

It's a bit more in Basic/Pascal way rather in C way....

Regards

Luis
by Bunuel66
Dec 05, 2006 17:33
Forum: DOS
Topic: general protection fault
Replies: 12
Views: 5170

Linked list GFP

Even if the list is correctly linked it could be due to a 'wild' access with an erroneous pointer.....

Regards.

Luis
by Bunuel66
Nov 16, 2006 20:24
Forum: General
Topic: Rotation question
Replies: 22
Views: 3431

Rotations

Write your rotation as a product matrix vector product Develop the expressions Express iteratively your angles Theta(n+1)=Theta(n)+DeltaTheta for each axis. Develop the sine and cosine and you will obtain an iterative expression without any tri transform using only sum and products. Sorry, I'm too l...
by Bunuel66
Nov 07, 2006 17:50
Forum: Beginners
Topic: no good at maths
Replies: 13
Views: 2322

Moving...

Don't get your point about hyp?? Are you willing to compute the new circle step by step? If so, the usual way is to use circular coordinates. Basically any point of a circle or radius R and centre C of coordinates (Xc,Yc) can be expressed as: X=Xc+R*cos(Theta) Y=Yc+R*sin(Theta) Then, if you intend t...
by Bunuel66
Nov 07, 2006 13:40
Forum: Beginners
Topic: no good at maths
Replies: 13
Views: 2322

Moving....

I'm not sure to grasp your question. If the matter is just moving from x1,y1 to x2,y2 in n steps you don't need trig: Dx=(x2-x1)/n Dy=(y2-y1)/n x(0)=x1 y(0)=y1 x(k)=x(k-1)+Dx y(k)=y(k-1)+Dy If it's about trig sin=opp/hyp, cos=adj/hyp If I misunderstood, please post again with a bit more details. Reg...
by Bunuel66
Oct 26, 2006 16:33
Forum: Windows
Topic: Two problems I've found.
Replies: 23
Views: 4780

Large array

Already covered previously. It's related with the memory allocation on Stack if not Shared. Then declare it Shared or resize the stack.

Regards.

Luis

Go to advanced search