Search found 2095 matches

by caseih
Dec 17, 2023 4:46
Forum: Windows
Topic: Win 11 console
Replies: 26
Views: 2051

Re: Win 11 console

I like the new terminal because it is a "real" terminal finally with proper terminal emulation. And it's much better for cutting and pasting command-line text. Been a long time coming. MS even ships ssh with Windows now. About time. Just wish they'd ship rsync too. And vim. haha.
by caseih
Nov 17, 2023 19:40
Forum: Community Discussion
Topic: [offtopic]Some cheap and tiny ARM devices.
Replies: 69
Views: 25357

Re: [offtopic]Some cheap and tiny ARM devices.

With the the exception of the SBCs and the PineBook laptops, none of Pine64's products are for end users at this stage. It's more for tinkerers. Some time I may buy a PineTab with its e-ink display and see if I can make something out of it. But I wouldn't expect it to be a ready-to-run tablet or e-b...
by caseih
Nov 13, 2023 15:40
Forum: DOS
Topic: [SOLVED] its possible Read a method from a executable file ?
Replies: 9
Views: 2048

Re: its possible Read a method from a executable file ?

As I understand it, the DJGPP compiler suite that FB for DOS uses includes its own DOS Extender. Binaries produced by FBC should be 32-bit already, even on DOS, so capable of supporting much more than 1 MB RAM. I've never used FB for DOS, but quite a few forum members have. Hopefully someone can chi...
by caseih
Nov 12, 2023 14:54
Forum: DOS
Topic: [SOLVED] its possible Read a method from a executable file ?
Replies: 9
Views: 2048

Re: its possible Read a method from a executable file ?

I believe FB can support DJGPP's DXE files, which are like DLLs. You can use DYLIBLOAD and friends to read and call functions in the DXE, and unload them when not needed. See https://www.freebasic.net/wiki/ProPgSharedLibrariesDOS
by caseih
Nov 02, 2023 0:05
Forum: Windows
Topic: Icon cache corruption
Replies: 22
Views: 4788

Re: Icon cache corruption

Windows 10 and 11 support symbolic links now, and explorer even is aware of them. By default they don't show the little shortcut arrow.

https://www.howtogeek.com/16226/complet ... -or-linux/
by caseih
Oct 25, 2023 23:35
Forum: General
Topic: I want to write a program that listens on a http port and can send a webpage back
Replies: 6
Views: 1840

Re: I want to write a program that listens on a http port and can send a webpage back

Theoretically FB already has support for GTK3 (bi files), although I cannot seem to locate a workable code example There is a library designed to work with GTK (without a GUI) called libsoup. It's a nice high-level library that is event driven, so you don't have to implement your own threads to lis...
by caseih
Oct 24, 2023 19:12
Forum: Hardware Interfaces / Communication
Topic: GPIB NI communication not possible with freebasic ?
Replies: 2
Views: 2446

Re: GPIB NI communication not possible with freebasic ?

Definitely possible. After all, you can do it from C, and FB can work with any library that C can. Existing .bi files and examples, I haven't seen any.
by caseih
Oct 22, 2023 14:27
Forum: Linux
Topic: Undefined reference AGAIN
Replies: 7
Views: 2292

Re: Undefined reference AGAIN

I should have used better, clearer language. I should have asked, "where was the sub actually implemented?" If I read @Dinosaur's posts correctly, he did have the implementation for the sub in the same file, but the linker was still not able to find it. Correct? When he cut and pasted the ...
by caseih
Oct 22, 2023 0:49
Forum: Linux
Topic: Undefined reference AGAIN
Replies: 7
Views: 2292

Re: Undefined reference AGAIN

Can't really tell much from the code you posted. Where is ChargeCycle defined? Is it in the same file?
by caseih
Oct 15, 2023 2:48
Forum: General
Topic: double trouble
Replies: 42
Views: 4957

Re: double trouble - continue

Now what !! I am using single values. for w as single = 0.0 to 1.0 step 0.1 print w next w sleep That step 0.1 is definitely a minor problem. Stepping by 0.1 accumulates tiny errors through every iteration of the loop since there's no exact binary representation of 0.1. By the way, to convert 0.1 t...
by caseih
Oct 14, 2023 22:55
Forum: General
Topic: double trouble
Replies: 42
Views: 4957

Re: round to two digits?

@hhr Your first code looked good, but we only need one failure to drag us back to the drawing board. I didn't examine the code. I think the problem is that when looking at the fractional part of the number, leading zeros are important, but trailing zeros are not. However any INTEGER type is going t...
by caseih
Oct 14, 2023 22:46
Forum: General
Topic: double trouble
Replies: 42
Views: 4957

Re: round to two digits?

I suspect (know, actually) that PB implemented its own printing routine, and made a good choice to limit to 15 digits. Whereas FB's runtime uses the Standard C Library's sscanf() or similar to do the conversion to string, and I guess the C library decided on 16 digits for some reason. Would be inter...
by caseih
Oct 14, 2023 19:29
Forum: General
Topic: double trouble
Replies: 42
Views: 4957

Re: round to two digits?

the more sophisticated ones get round it by holding your intermediate result as an (improper) fraction. IEEE actually defined a fractional type where numbers are stored as essentially two integers. I think this was sometimes called "floating slash." But it never caught on as far as hardwa...
by caseih
Oct 14, 2023 19:22
Forum: General
Topic: double trouble
Replies: 42
Views: 4957

Re: round to two digits?

Good point. There are lots of gotchas with IEEE floating point, and precision doesn't always give you accuracy. Perhaps with single precision, when printing out the number to the screen, PRINT stops far earlier, knowing that the number of decimal places possible are much less. So the extra .00000000...
by caseih
Oct 14, 2023 15:17
Forum: General
Topic: double trouble
Replies: 42
Views: 4957

Re: round to two digits?

Ain't floating point fun? Edited this post to make it shorter and maybe less presumptuous. There is no getting away from the fact that 93/100 is 0.93. With FreeBASIC 'Print 93/100' gives 0.9300000000000001. With PowerBASIC we get 0.93. Whatever the reason for the difference, FreeBASIC is getting it ...