Search found 5431 matches

by counting_pine
Feb 18, 2019 19:42
Forum: Beginners
Topic: How to convert String (or Double) to SerialNumber
Replies: 10
Views: 214

Re: How to convert String (or Double) to SerialNumber

Cint() in QB wasn’t simply used for mathematical rounding, but for type conversion. It was limited to results between -32768 and 32767. Clng() had a wider type, but still couldn’t convert/round every possible double-precision value. I agree that val(mid()) is the most familiar way for QB users, but ...
by counting_pine
Feb 18, 2019 13:58
Forum: DOS
Topic: FreeDOS 21st century?
Replies: 9
Views: 223

Re: FreeDOS 21st century?

The wiki has got you covered: /wiki/GfxDefPalettes
The palette can be changed to whatever you like though, with e.g. Palette i, r, g, b.
by counting_pine
Feb 18, 2019 13:47
Forum: Beginners
Topic: How to convert String (or Double) to SerialNumber
Replies: 10
Views: 214

Re: How to convert String (or Double) to SerialNumber

Yeah, I used to recommend Valint(), but the legacy naming issues give some uncertainty about the size of the type returned. So Cint/Clng/Clngint/... is clearer, if you're happy with the idea of using them for conversions from string. That's something QB didn't support. (But then it didn't support Va...
by counting_pine
Feb 17, 2019 22:26
Forum: DOS
Topic: FreeDOS 21st century?
Replies: 9
Views: 223

Re: FreeDOS 21st century?

Just to see how FreeDOS handles GUI, I created the program below. A couple of things I did notice with the FBC DOS version, only 16 colors to work with? The other thing is, for some reason the "time' display does not look right, not sure how to fix that. I am sure that there are other things t...
by counting_pine
Feb 17, 2019 21:42
Forum: Beginners
Topic: How to convert String (or Double) to SerialNumber
Replies: 10
Views: 214

Re: How to convert String (or Double) to SerialNumber

If you're happy to use the C runtime, you could use sscanf: #include "crt.bi" #include "vbcompat.bi" Function Str2SerNum(ss As String) As Double dim as long ye, mo, da, ho, mi, se sscanf(ss, "%4d%2d%2d%2d%2d%2d", @ye,@mo,@da,@ho,@mi,@se) Dim As Double tst = DATESERIAL(y...
by counting_pine
Feb 16, 2019 18:02
Forum: Projects
Topic: Coil Inductance and Q Calculator
Replies: 12
Views: 243

Re: Coil Inductance and Q Calculator

Probably the single most helpful page for this kind of situation is /wiki/LangQB, although it's more geared towards QB than PDS.
Do you have any suggestions for things to add there from your experiences?
by counting_pine
Feb 16, 2019 13:13
Forum: Beginners
Topic: Alias
Replies: 3
Views: 92

Re: Alias

The problem is that FB is case-agnostic with things like variables and function names, and in practice this means it exports my_func2 as uppercase: e.g. MY_FUNC2. So if you make the alias uppercase as well, it works: declare function my_func alias "MY_FUNC2" (byval z as zstring ptr) as lon...
by counting_pine
Feb 16, 2019 13:07
Forum: Projects
Topic: Coil Inductance and Q Calculator
Replies: 12
Views: 243

Re: Coil Inductance and Q Calculator

Hi k6sti, thanks for sharing your project. Are you willing to provide the code for it? This prevents people having to run an untrusted executable just to see what it does.
What kinds of problems did you run into when porting the code? Was written in QBasic previously?
by counting_pine
Feb 14, 2019 13:41
Forum: Tips and Tricks
Topic: GDIPlus ASCII GIF Anim Player [Windows only]
Replies: 8
Views: 263

Re: GDIPlus ASCII GIF Anim Player [Windows only]

Thanks for changing it. I don't really like GIF web sites and the general randomness of their content, but something like https://i.gifer.com/17YK.gif might work well. (8-bit, chunky, with motion).
But the image you've changed to is already "very cool".
by counting_pine
Feb 14, 2019 11:45
Forum: Tips and Tricks
Topic: GDIPlus ASCII GIF Anim Player [Windows only]
Replies: 8
Views: 263

Re: GDIPlus ASCII GIF Anim Player [Windows only]

As always, a nice example. But it would be better if the example image here could be a bit more "safe for work".
by counting_pine
Feb 11, 2019 20:51
Forum: Tips and Tricks
Topic: Image Painting Demos [Windows only]
Replies: 22
Views: 625

Re: Image Painting Demos [Windows only]

https://freebasic.net/forum/viewtopic.php?p=258043#p258043 MrSwiss, we've had a complaint about your posts in this thread, in particular the one above.If you don't like the Windows dependency of the code, that's fine, but the derogatory and unconstructive comments are not welcome, and you've been wa...
by counting_pine
Feb 11, 2019 14:09
Forum: Windows
Topic: Huh-Yuh Lanuage
Replies: 9
Views: 281

Re: Huh-Yuh Lanuage

Can you explain what this code does?
by counting_pine
Feb 08, 2019 14:21
Forum: Beginners
Topic: Matrix to string
Replies: 15
Views: 207

Re: Matrix to string

Without a full testbed, the analysis of your problem is difficult. However, it is pretty clear that this part is very slow: For j = lbx to ubx-1 clips = clips + Str(Z(i,j)) + Chr(9) next j Allocate one long line, then copy the 512 tiny strings into that line and trim it as needed. P.S.: I gave it a...
by counting_pine
Feb 07, 2019 13:37
Forum: General
Topic: Max Upload Size
Replies: 7
Views: 209

Re: Max Upload Size

Once a project gets this sort of size, and you want to make the source public, it would generally be a good idea to store it in an online repository (e.g. Bitbucket, GitHub or GitLab), which have lots of advantages to pasting into a forum: - the code can be shared, and a link provided to the forum, ...
by counting_pine
Feb 06, 2019 14:00
Forum: Documentation
Topic: Windows bug for small screens / fullscreen
Replies: 24
Views: 552

Re: Documentation of PMAP function

I see now, just a documentation shortcoming.
The simplest solution is probably just to use ScreenRes, as suggested.

Go to advanced search