Search found 1433 matches

by caseih
Apr 16, 2015 2:09
Forum: Community Discussion
Topic: What is wrong with the BASIC language?
Replies: 72
Views: 11856

Re: What is wrong with the BASIC language?

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration - Edsger W. Dijkstra What bad habits do you get from learning programming using the latest version of FreeBASI...
by caseih
Apr 11, 2015 20:00
Forum: General
Topic: How to get Hexadecimal to Decimal?
Replies: 11
Views: 1499

Re: How to get Hexadecimal to Decimal?

Looks like you're right. I guess it's the octal notation in C that puts meaning to the leading zero. I guess I've been vainly putting in leading zeros on hex constants for years for no reason. C constants are always positive, typically typed as the smallest signed integer type that can hold this pos...
by caseih
Apr 11, 2015 13:35
Forum: General
Topic: How to get Hexadecimal to Decimal?
Replies: 11
Views: 1499

Re: How to get Hexadecimal to Decimal?

Oops I missed bin() and &b somehow. I remember looking for it some time back in the docs, but must not have looked very hard. Good call on the cint() vs val()! I think adding leading 0 support for literals and also val(), cint(), and friends would be a good idea. Can't see that break existing co...
by caseih
Apr 11, 2015 2:30
Forum: General
Topic: How to get Hexadecimal to Decimal?
Replies: 11
Views: 1499

Re: How to get Hexadecimal to Decimal?

PowerBasic added a bin() and &b notation for dealing with binary, which was sometimes useful. Maybe FB could add that some day. EDIT: I can understand why few languages have bothered... when dealing in binary notation, the length of the datatype matters greatly. For example for a signed byte &am...
by caseih
Apr 11, 2015 2:02
Forum: General
Topic: How to get Hexadecimal to Decimal?
Replies: 11
Views: 1499

Re: How to get Hexadecimal to Decimal?

Not quite sure what you mean. A number is a number. It is neither hexadecimal or decimal until you convert it to a string. If you have a string representation of a number, you convert it to a number using val(). That representation can be hexadecimal (with the "&h" prefix). print val(&...
by caseih
Apr 05, 2015 19:40
Forum: General
Topic: Floating point and Format (bug?)
Replies: 6
Views: 957

Re: Floating point and Format (bug?)

I would imagine that val() not recognizing a locale-specific number string could be construed to be a bug. Fixing it would be hard, but nevertheless maybe you should open an issue on the bug tracker.
by caseih
Apr 01, 2015 3:18
Forum: Beginners
Topic: CLOUD
Replies: 1
Views: 482

Re: CLOUD

Most cloud providers offer some sort of web-based API for accessing cloud storage. To access this from FreeBasic you'd need to implement a program that can speak http protocol to the server, as most APIs are based on remote procedure calls via http requests. If the cloud service offers a C api, you ...
by caseih
Mar 25, 2015 4:09
Forum: Beginners
Topic: FB Equivalent of Records
Replies: 17
Views: 1627

Re: FB Equivalent of Records

Here's the FreeBASIC wiki documentation on the subject:

http://www.freebasic.net/wiki/wikka.php?wakka=ProPgUDTs
by caseih
Mar 25, 2015 2:03
Forum: Beginners
Topic: FB Equivalent of Records
Replies: 17
Views: 1627

Re: FB Equivalent of Records

Most modern BASIC dialects call them "User-defined Types" or UDTs. As you've found out, the syntax is not so different from the old QB "Records" as you call them.
by caseih
Mar 24, 2015 14:41
Forum: General
Topic: Questions on inheritance in FreeBASIC
Replies: 337
Views: 51268

Re: Questions on inheritance in FreeBASIC

OOP is just a tool in the programmer's toolbox. It should be used as appropriate, and no more. FB's OOP support may be incomplete, syntactically, but at least it's implemented in a such a way that you can use it as you need it, which is what you are already doing, Boris. Java erred by forcing all pr...
by caseih
Mar 23, 2015 22:54
Forum: Beginners
Topic: what are the tools to use?
Replies: 13
Views: 1653

Re: what are the tools to use?

I'm not so keen to recommend GTK without caveats. I've been using GTK off and on for years, ever since 1.0. It's a fine toolkit, and it's very powerful and flexible, and is my go-to toolkit at the moment. The runtime comes in around 9-10 MB, which is similar to other toolkits like Qt. Your end users...
by caseih
Mar 14, 2015 1:24
Forum: Beginners
Topic: Long, involved installation problem
Replies: 19
Views: 2789

Re: Long, involved installation problem

There's nothing wrong with your install, as near as I can tell. Whether or not sudo cd /root returns an error or not depends on your shell. If you have a recent version of bash installed, it does provide a /bin/cd command, so sudo would not complain. If you have a shell that doesn't provide a cd bin...
by caseih
Mar 10, 2015 18:54
Forum: Community Discussion
Topic: Creating Static lib with function level granularity
Replies: 14
Views: 1799

Re: Creating Static lib with function level granularity

Of course fbc compiles .bi files! #include merely brings in code from another file, which is parsed and compiled like any other code. Now of course using a .bi file the way the OP is using is unusual, and perhaps not the best practice. And in fact there are times when code in the .bi file cannot wor...
by caseih
Mar 08, 2015 15:36
Forum: Community Discussion
Topic: Creating Static lib with function level granularity
Replies: 14
Views: 1799

Re: Creating Static lib with function level granularity

If you compile the static library with the appropriate GCC flags, you can then at link stage tell the linker to discard unused symbols. To do this on fbc, you'll have to figure out how to have fbc pass the appropriate flags to the gcc compiler, and the appropriate flag to the linker: http://stackove...
by caseih
Mar 06, 2015 15:11
Forum: Linux
Topic: FB Linux complier
Replies: 1
Views: 768

Re: FB Linux complier

The message means what it says. Whatever intrusion detection system the web site is running, it has decided that traffic coming from your web site is a malicious pattern and has blocked you. Could be something as simple as too many accesses in a given amount of time. Given that this is a free web se...

Go to advanced search