Search found 1055 matches

by jevans4949
Oct 01, 2024 17:38
Forum: Beginners
Topic: How do I read a Text or CSV file from EXCEL
Replies: 9
Views: 4402

Re: How do I read a Text or CSV file from EXCEL

A CSV file can be read be read using GET # in the standard way, provided none of the fields are likely to contain carriage return line breaks, as the I/O routines don't recognise that these are not meant to be end-of-line indicators. Also note that in Italian CSV files, commas are used to indicate d...
by jevans4949
Sep 13, 2024 12:06
Forum: Beginners
Topic: pointers
Replies: 14
Views: 5510

Re: pointers

You can also declare the lower bound of an array as non-zero, and the compiler will adjust (unlike C). For example

Code: Select all

Dim a(Asc("A") to Asc("Z")) as integer POINTER
by jevans4949
Mar 08, 2024 17:43
Forum: Community Discussion
Topic: Freebasic 1.20.0 Development
Replies: 327
Views: 98911

Re: Freebasic 1.20.0 Development

Thinking around the issue of converting existing code, I suppose that code that depends on the existing STRING*n construct would proabaly work by changing DIMs to ZSTRING*n most of the time. Yes, but the compatibility that exists between a STRING*N and a STRING no longer exists between a ZSTRING*N ...
by jevans4949
Mar 08, 2024 14:41
Forum: Community Discussion
Topic: Freebasic 1.20.0 Development
Replies: 327
Views: 98911

Re: Freebasic 1.20.0 Development

Thinking around the issue of converting existing code, I suppose that code that depends on the existing STRING*n construct would proabaly work by changing DIMs to ZSTRING*n most of the time.
by jevans4949
Feb 26, 2024 23:25
Forum: Community Discussion
Topic: Freebasic 1.20.0 Development
Replies: 327
Views: 98911

Re: Freebasic 1.20.0 Development

I remember back in the day, in some versions of BASIC, people used to store binary data in strings. Sure, we have workarounds for that, but maybe it needs to be thought about.
by jevans4949
Feb 25, 2024 18:31
Forum: Community Discussion
Topic: Freebasic 1.20.0 Development
Replies: 327
Views: 98911

Re: Freebasic 1.20.0 Development

To change STRING* at this stage is probably going to break a lot of code, although the change you suggest will make it easier to convert QBASIC / GWBASIC programs to Freebasic. I suggest:- * Have a new string type (FSTRING*?) which behaves in the way you describe * Rename the eixisting one (CSTRING*...
by jevans4949
Nov 10, 2023 19:07
Forum: General
Topic: I need a workaround for a DIR problem
Replies: 12
Views: 3822

Re: I need a workaround for a DIR problem

Where would I find findfirstfile/findnextfile ? And yes it could be a Unicode character mixed in with the filename. I got this file from a friend in Europe and English is not his first language. I looked at the characters in the filename and it was an embedded zero byte in the middle of the filenam...
by jevans4949
Nov 10, 2023 17:53
Forum: General
Topic: I need a workaround for a DIR problem
Replies: 12
Views: 3822

Re: I need a workaround for a DIR problem

You could try using findfirstfile/findnextfile variants instead of DIR.
by jevans4949
Oct 14, 2023 16:19
Forum: General
Topic: double trouble
Replies: 42
Views: 8448

Re: round to two digits?

You have the same problem with pocket calculators; the more sophisticated ones get round it by holding your intermediate result as an (improper) fraction. Try doing 1/3+1/3+1/3 on older calculators and you will get 0.999999. A modern one will have internally calculated 3/3 and will give you the corr...
by jevans4949
Oct 07, 2023 17:41
Forum: General
Topic: Reset Random Numbers
Replies: 9
Views: 2900

Re: Reset Random Numbers

Randomize timer uses the current value of the timer to set the rnd function going. Depends on how your chosen ransomizer works, but you should be able to generate the same numbers over and over by randomize with a defined value - either a constant or a value you key in. Suggest you try it and see wi...
by jevans4949
Sep 30, 2023 9:40
Forum: General
Topic: Question on internal workings of Allocate
Replies: 4
Views: 1958

Re: Question on internal workings of Allocate

I seem to remember that I discovered the length is in the qword before the pointer which you get back. Don't think this is publicised anywhere You could test fairly easily whether this is the case.
by jevans4949
Sep 23, 2023 15:53
Forum: Windows
Topic: how to enter multibyte character with INPUT statement
Replies: 2
Views: 2532

Re: how to enter multibyte character with INPUT statement

Can't remember the details, but INPUT has its own keboard map similar to the old DOS maps, so only allows 256 character set. I believe you can change it, but I can't rememeber how, and not for standard Chinese. You probably need to go to Windows or FLTK. Sorry, it's not a problem I've pursued in any...
by jevans4949
Jun 12, 2023 9:24
Forum: Community Discussion
Topic: Freebasic 1.20.0 Development
Replies: 327
Views: 98911

Re: Freebasic 1.20.0 Development

What about versions 1.11 to 1.19?
by jevans4949
Mar 09, 2023 11:40
Forum: Community Discussion
Topic: It's it possible to translate FreeBasic for Atari2600 ?
Replies: 8
Views: 2439

Re: It's it possible to translate FreeBasic for Atari2600 ?

Reminds me of a spoof ad for Sinclair Z80 machine, saying you could use it for some purpose I now forget, but with the comment "Requires 16,000 1K RAM packs". Afaik z80 memory above 64k requires bankswitching on the address bus pins, and that is rarely automatically done in-compiler afaik...
by jevans4949
Mar 09, 2023 10:05
Forum: Community Discussion
Topic: It's it possible to translate FreeBasic for Atari2600 ?
Replies: 8
Views: 2439

Re: It's it possible to translate FreeBasic for Atari2600 ?

Reminds me of a spoof ad for Sinclair Z80 machine, saying you could use it for some purpose I now forget, but with the comment "Requires 16,000 1K RAM packs".