Search found 5528 matches

by counting_pine
Nov 07, 2005 23:52
Forum: General
Topic: Memory data packing... (try 2)
Replies: 10
Views: 2534

Re: Memory data packing... (try 2)

Ok, first off, you probably don't want to pass a pointer to a pointer, just pass the pointer. Second, why are you converting to a byte? This will cause fb to convert it *back* to an integer, or ignore your byte conversion in the first place. jcohen, I suspect you want foo to be a ubyte ptr. Not onl...
by counting_pine
Nov 02, 2005 13:51
Forum: General
Topic: DLL function calls
Replies: 10
Views: 1866

I've tried using PRINT in a DLL function for use in VB, but that crashes. I'm not an expert on consoles, etc. so I couldn't give you a good reason why. Also: DIM fp As Single Ptr: fp = @arry Don't you mean: DIM fp As Single Ptr: fp = arry arry is already a pointer. I really don't think you want the ...
by counting_pine
Nov 01, 2005 13:09
Forum: General
Topic: iif annoyance
Replies: 2
Views: 1015

iif annoyance

If you try to do:

Code: Select all

b = iif(a, 1/a, 0)

The compiler complains because it sees the 0 as an integer, but replacing it with 0. or 0! or 0# works fine.
Would it be possible for the compiler to take care of type differences like this?
by counting_pine
Oct 31, 2005 16:46
Forum: Tips and Tricks
Topic: Get a transparent image from photoshop to GfxLib
Replies: 30
Views: 12795

why on earth would a color be brighter over black than on white? I take it you haven't tried your program on the GIFs you posted then. That's why I suggested posting the images in a lossless format. Saving a true-colour image as a 256-colour GIF means the resulting image is just an approximation. W...
by counting_pine
Oct 31, 2005 16:22
Forum: Tips and Tricks
Topic: ShowBits64
Replies: 8
Views: 4185

I wouldn't know how, but I suspect the ASM version could be optimised as well.
You could at least use J = I \ 8 or J = I Shr 3 instead of J = Int(I / 8). It's almost surreal to see a statement like that in the middle of some assembly code.
by counting_pine
Oct 31, 2005 15:01
Forum: Tips and Tricks
Topic: Get a transparent image from photoshop to GfxLib
Replies: 30
Views: 12795

Nice program. You might want to post the example images in a lossless format though. Any differences in the Red channel will result in some transparency. What's worse, if the Onblack pixel has a lighter value than the Onwhite pixel, then the Alpha byte will overflow. This can result in almost entire...
by counting_pine
Oct 31, 2005 13:36
Forum: Tips and Tricks
Topic: ShowBits64
Replies: 8
Views: 4185

It is nice to see a simple example of ASM though.
Is there a way of getting the original COLOR values back?
by counting_pine
Oct 29, 2005 7:54
Forum: Beginners
Topic: Booleans: a workaround
Replies: 8
Views: 1712

Wouldn't it be useful to have a BOOLEAN data type in FreeBASIC? For example, if FB comes across: Bool3 = Bool1 OR Bool2 If Bool1 is true, then you don't need to evaluate Bool2, which could be a variable or a function, or a conditional statement, such as a > b. (The other way of including a feature l...
by counting_pine
Oct 28, 2005 12:49
Forum: Windows
Topic: Trouble with using the Shell XCOPY to make an auto-install
Replies: 16
Views: 5435

I agree. Using Shell sounds messy.
by counting_pine
Oct 25, 2005 3:28
Forum: Documentation
Topic: Keywords that do not have a page yet...
Replies: 5
Views: 3015

Oh, only just remembered to add SCOPE to the contents page and keyword index. I guess that's an important bit to remember.
by counting_pine
Oct 24, 2005 5:24
Forum: Documentation
Topic: Keywords that do not have a page yet...
Replies: 5
Views: 3015

Perhaps the missing pages should also be mentioned here?
BTW, I've had a go at SCOPE. It's the first time I've created a Wiki page, so you may want to check it.
by counting_pine
Oct 24, 2005 3:48
Forum: General
Topic: Qustion to CINT Function
Replies: 7
Views: 1820

Visual Basic, at least before .NET, was probably quite flexible with that sort of thing because of Variants. If a number was used in a place where VB expected a string, it was automatically converted to a number. Dim a As String a = 2 'a = "2" If a string was used in a place where VB expec...
by counting_pine
Oct 20, 2005 8:52
Forum: Beginners
Topic: resource problems...
Replies: 12
Views: 2686

well, for some reason, i was able to save the icon as a ico (i just checked too.) with paint ^_^. Are you sure it was an icon? Windows can recognise bitmaps as icons to the extent that you can use them in shortcuts and a bitmap saved with the extension .ico will look like an icon in Explorer. If yo...
by counting_pine
Oct 16, 2005 17:31
Forum: Beginners
Topic: save and load
Replies: 12
Views: 1952

In the first example, the compiled program evaluates 0 / 0 at runtime.
In the second example, the compiler will evaluate 0 / 0 and put it in as a constant.
It looks like the compiler and the compiled program evaluate it differently.
by counting_pine
Oct 15, 2005 20:29
Forum: Tips and Tricks
Topic: Use "AND" for combining flags instead of "OR&
Replies: 14
Views: 3622

I think, once you understand the concept of bits and bitwise operations, the idea becomes counter-intuitive. It also means that the flags have funny values like -9. And If I was using it, I'd be worried that truncating a flag into a smaller data type could inadvertently set some undesired flags furt...

Go to advanced search