Data types

New to FreeBASIC? Post your questions here.
Posts: 6
Joined: Aug 31, 2008 17:03

Data types

Postby Dark » Oct 03, 2008 2:48

Hello everybody,
Is it posible to declare variables like this

Dim X$ = Dim x as string?
Dim X# = Dim x as real?

is this kind of declaration posible?
Site Admin
Posts: 6190
Joined: Jul 05, 2005 17:32
Location: Manchester, Lancs

Postby counting_pine » Oct 03, 2008 2:53

Support for variable suffixes has been removed in the default dialect, but you can use them in the other dialects, such as lang fblite or lang qb.
To change to a different dialect, e.g. fblite, you can either put #lang "fblite" at the top of your code, or compile it with fbc -lang fblite.
See these pages for more information: ... erDialects
Posts: 6
Joined: Aug 31, 2008 17:03

Postby Dark » Oct 03, 2008 3:05

Thank you i think people can code alot faster by using those types of denumerizations for coding Peace :)
Posts: 432
Joined: Oct 01, 2005 10:50
Location: Maryland

Postby Eclipzer » Oct 03, 2008 17:56

There was actually a HUGE discussion on this very topic not too many months ago. I've always been for type suffixes, though after being forced not to use them in order to take advantage of FBs full instruction set, I have become accustomed to not using them. However, I still feel, among other things, that they would greatly reduce the "bloat" you find in procedures with huge parameter lists.

previous discussion:

Return to “Beginners”

Who is online

Users browsing this forum: No registered users and 8 guests