Search found 820 matches

by Munair
Mar 06, 2019 16:38
Forum: Projects
Topic: BASIC Studio for Linux (in development)
Replies: 127
Views: 7781

Re: BASIC Studio for Linux (in development)

As one may have noticed, there have been no updates here for a while. The reason is that I started development of a new interpreter/language for the project, which allows for fully integrated inspection, debugging and also language features such as class support and null objects (which I greatly mis...
by Munair
Feb 19, 2019 6:56
Forum: Beginners
Topic: How to convert String (or Double) to SerialNumber
Replies: 11
Views: 348

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

Yes, I forgot to include that QB's CInt in the first place converts numeric expressions to integer.
by Munair
Feb 18, 2019 18:40
Forum: Beginners
Topic: How to convert String (or Double) to SerialNumber
Replies: 11
Views: 348

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

Coming from QuickBASIC I find CInt() much more misleading for string to number conversion as in QB its only function was to round numeric expressions. In this respect Val() is more consistent in that it is traditionally associated with string to number conversion.
by Munair
Feb 18, 2019 6:17
Forum: Beginners
Topic: How to convert String (or Double) to SerialNumber
Replies: 11
Views: 348

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

counting_pine wrote:Otherwise, I'd recommend CInt(Mid(...)) instead of Val(Mid(...)), to avoid the floating-point math.

Why not use ValInt or in this case ValUInt directly?
by Munair
Feb 18, 2019 6:04
Forum: Community Discussion
Topic: Building FreeBASIC 1.06 Release
Replies: 46
Views: 2880

Re: Building FreeBASIC 1.06 Release

Thank you very much coderJeff for your commitment and efforts to keep the FB project going. I'm sure it's very much appreciated by many.
by Munair
Feb 08, 2019 18:55
Forum: General
Topic: Undefined Reference on just declarations
Replies: 12
Views: 419

Re: Undefined Reference on just declarations

In the past I used constructors a lot to do initial population of (object) arrays. In RealBASIC it was even mandatory or the object arrays' elements would not reference. Here is a basic example: type T x as integer end type type TList list(any) as T declare constructor(byval x as integer) end type c...
by Munair
Feb 08, 2019 10:37
Forum: Beginners
Topic: Matrix to string
Replies: 15
Views: 293

Re: Matrix to string

Yes, marpon's suggestion will be a great speed improvement too, but it requires administering the string position and size.
by Munair
Feb 08, 2019 10:28
Forum: Beginners
Topic: Matrix to string
Replies: 15
Views: 293

Re: Matrix to string

It might help if you use a union instead of plain number to string conversion and also limit the string operations by using a line ending constant: const EndOfLine = chr(13)+chr(10) type TDouble union char as string * 8 value as double end union end type ' ... sub clip_string_uni_matrix (Z() As TDou...
by Munair
Feb 02, 2019 5:57
Forum: General
Topic: RND breadth
Replies: 38
Views: 792

Re: Coders

Could you make the title more fitting?
by Munair
Jan 29, 2019 9:48
Forum: Beginners
Topic: Unicode and files
Replies: 10
Views: 422

Re: Unicode and files

On most Unix-like systems there is the convention that filenames are interpreted as UTF-8, even though file system drivers just handle the byte sequence; it doesn't matter to them what the bytes mean. The only two special bytes are the slash and the null-character. There are applications that interp...
by Munair
Jan 22, 2019 14:34
Forum: Libraries
Topic: No german umlauts with libcurl
Replies: 25
Views: 979

Re: No german umlauts with libcurl

marcov wrote:(Note that since this April's Windows 10 update, Windows 10 has an option to set the character set to utf8. I haven't tested yet, but long term this could significantly increase Windows compatibility to *nix)

Microsoft finally coming to their senses.
by Munair
Jan 18, 2019 7:58
Forum: Beginners
Topic: A new Unicode & Newbie problem
Replies: 16
Views: 503

Re: A new Unicode & Newbie problem

If you use a normal string data type, the bytes should be preserved.
by Munair
Jan 18, 2019 6:22
Forum: Beginners
Topic: A new Unicode & Newbie problem
Replies: 16
Views: 503

Re: A new Unicode & Newbie problem

There is no such thing as a Unicode string. You would have a string containing a Unicode encoding, either UTF8, UTF16 or UTF32. While Linux and the internet primarily use UTF8, Windows doesn't. So it is the encoding conversion that matters.
by Munair
Jan 12, 2019 16:24
Forum: Beginners
Topic: reading random access files
Replies: 9
Views: 332

Re: reading random access files

As most programming languages these days do not support random access files (fixed length records), I replicated this using a binary stream object several years ago in Real Basic as a means of providing a simple and fast database where fixed records are sufficient. I haven't got around to translatin...
by Munair
Jan 07, 2019 7:40
Forum: General
Topic: const as union
Replies: 8
Views: 245

Re: const as union

You must include the dim statement:

Code: Select all

dim as const abType AB2 = type(1, 1) '<-- allowed

Go to advanced search