FreeBASIC Online Documentation - Wiki

Forum for discussion about the documentation project.
counting_pine
Site Admin
Posts: 6323
Joined: Jul 05, 2005 17:32
Location: Manchester, Lancs

Re: FreeBASIC Online Documentation - Wiki

Post by counting_pine »

I've cleaned up the comment spam.
Those "recently" registered users are marked as deleted in the database, so they can't do any damage.
srvaldez
Posts: 3373
Joined: Sep 25, 2005 21:54

Re: FreeBASIC Online Documentation - Wiki

Post by srvaldez »

hello fxm
information on literal suffixes for integer types is a bit hard to find, typing suffix in the index or search does not help, I found the info by accident by typing ll, in Literals
paul doe
Moderator
Posts: 1730
Joined: Jul 25, 2017 17:22
Location: Argentina

Re: FreeBASIC Online Documentation - Wiki

Post by paul doe »

Indeed. Another member recently had the same issues. Perhaps the 'Literals' section could be right in the Table of Contents, under 'Language Documentation', or 'Variables and data types'?
fxm
Moderator
Posts: 12082
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: FreeBASIC Online Documentation - Wiki

Post by fxm »

Regarding the list of literal suffixes for predefined types, it is described:
- In the tables of the Standard Data Type Limits page (FreeBASIC Manual / Variables and Data Types / Standard Data Type Limits).
- In a paragraph of the Literals page (FreeBASIC Manual / Programmer's Guide / Lexical Conventions / Literals).
marcov
Posts: 3455
Joined: Jun 16, 2005 9:45
Location: Netherlands
Contact:

Re: FreeBASIC Online Documentation - Wiki

Post by marcov »

(It is possible that auto index of hh workshop doesn't index certain special characters or strips them. In that case you'd need to create the index yourself)
fxm
Moderator
Posts: 12082
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: FreeBASIC Online Documentation - Wiki

Post by fxm »

For some time now, I have noticed that access times to Wiki are sometimes becoming very long.
Then it seems to me that if we are logged in, the access times become correct again.
Is it just a combination of circumstances ?
badidea
Posts: 2586
Joined: May 24, 2007 22:10
Location: The Netherlands

Re: FreeBASIC Online Documentation - Wiki

Post by badidea »

It is indeed slow. Now I even get:

Request Timeout
This request takes too long to process, it is timed out by the server. If it should not be timed out, please contact administrator of this web site to increase 'Connection Timeout'.
fxm
Moderator
Posts: 12082
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: FreeBASIC Online Documentation - Wiki

Post by fxm »

fxm wrote:For some time now, I have noticed that access times to Wiki are sometimes becoming very long.
Then it seems to me that if we are logged in, the access times become correct again.
Is it just a combination of circumstances ?
I confirm my remark in red.
fxm
Moderator
Posts: 12082
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: FreeBASIC Online Documentation - Wiki

Post by fxm »

@Jeff,

I don't understand this recent change:
- sf.net #455: fbc: Allow &nnn... octal literals in source (like VALINT and friends)
Can you give an example (before, after)?
coderJeff
Site Admin
Posts: 4313
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: FreeBASIC Online Documentation - Wiki

Post by coderJeff »

One part of the change is that octal numbers can be given by '&nnn...' where n is [0-7].

Code: Select all

                          '' fb 1.09.0   fb 1.10.0
var x = &17               ''    error       OK               
var y = valint( "&17" )   ''     OK         OK
print x, y                
The other part of the change is that if there is a prefix, a warning is given if no digits follow.

Code: Select all

                          '' fb 1.09.0   fb 1.10.0
var a = &b                ''     OK       warning
var b = &o                ''     OK       warning
var c = &h                ''     OK       warning
print a, b, c
fxm
Moderator
Posts: 12082
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: FreeBASIC Online Documentation - Wiki

Post by fxm »

- sf.net #455: fbc: Allow &nnn... octal literals in source (like VALINT and friends)
Thanks.
("like VALINT" tricked me, because this special case already works with fbc 1.09.0)
fxm
Moderator
Posts: 12082
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: FreeBASIC Online Documentation - Wiki

Post by fxm »

@Jeff,

About this change:
- fbc: allow gnu triplets for -target option even in standalone builds
How do I update this paragraph of the Compiler Option: -target documentation page ?
  • For backwards compatibility, if the given platform string describes the host and is an FB target name (the values accepted by the -target option with a standalone FB setup) instead of a GNU triplet, then the -target option will be ignored, and the <platform>- string will not be prefixed to compiler tools. For example, this allows -target linux to work with the FB-linux release. It will be ignored instead of causing the compiler to try to use linux-ld instead of ld.
It's beyond my skills !
coderJeff
Site Admin
Posts: 4313
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: FreeBASIC Online Documentation - Wiki

Post by coderJeff »

@fxm, the paragraph in the normal FB setup is fine.

Added to standalone FB setup section on -target:
-target may be specified as a gnu triplet as an alternate method for specifying the platform target and architecture. For example, -target i586-pc-mdosdjgpp will identify as -arch 586 -target dos and will look for binaries in bin/dos/ and libraries in lib/dos/. The platform string is not prefixed to names of binary tools.
I was working on a standalone package for a windows (7+) to dos cross compiler and I found allowing this use of '-target' convenient when also building fbc itself and rtlib. So the example is specific to dos.
fxm
Moderator
Posts: 12082
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: FreeBASIC Online Documentation - Wiki

Post by fxm »

@Jeff,

Should I add the new '-buildprefix <name>' command line option in the 'Behaviour' section on the fbc command-line documentation page or in another section ?
coderJeff
Site Admin
Posts: 4313
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: FreeBASIC Online Documentation - Wiki

Post by coderJeff »

Hey, fxm, I love your expeditiousness. Thank-you. :)

'-buildprefix' can go with Behaviour'.

I reviewed current changes and I think I have some descriptions below that should be more precise than my changelog and commit messages. It may help to provide a starting point for '-buildprefix' and possibly better content for '-prefix' and '-target'. The rules for calling tools (AS, AR, LD, etc) have grown organically over the years, so honestly it's a little bit of a mess in fbc source code. The rules will continue to evolve as contributors push fbc to new platforms and tools.

1) Default prefix:
- prefix may have been compiled in when fbc itself was compiled, in which case the default prefix is determined by fbc's build/makefile option 'ENABLE_PREFIX'
If fbc was not compiled with 'ENABLE_PREFIX':
- standalone: prefix = <fbc path>/
- normal : prefix = <fbc path>/../

2) Override default prefix:
- if the '-prefix <path>' command line option given, overrides the default prefix

3) Default target:
- determined by target build for fbc itself by fbc's makefile

4) Override target:
- if the '-target <target>' command line option given, overrides the default target

5) Default buildprefix:
- always empty (i.e. "")

6) Override buildprefix:
- if the '-buildprefix <name>' command line option given, overrides the default build prefix

7) Default binary, include, and library paths:
- binary path: where tools are located (AS, LD, AR, etc)
- include path: location of fbc's '*.bi' files
- libary path: where fbc's libraries are located (static libraries and import libraries)
- toolname: the name of a specific tool, which may include the path for a specific location, or the name of the tool only if relying on PATH environment variable

standalone fbc:
- binary path = <prefix>/bin/<target>/
- toolname = <binary path> + <buildprefix> + <tool name>[.exe]
- include path = <prefix>/inc
- library path = <prefix>/lib/<target>

normal fbc:
- binary path = <prefix>/freebasic/<target->
- binary path = <prefix>/freebasic/<buildprefix>
- default binary path:
---- binary path = <prefix>/bin/<target->
- or if '-buildprefix' given
----- binary path = <prefix>/bin/<buildprefix>
- toolname = <binary path> + <tool name>[.exe]
- If binary tool not found, then rely on PATH environment variable to find:
---- toolname = <target-|buildprefix> + <tool name>
- include path = prefix/include/freebasic
- library path = prefix/lib[64]/freebasic/target

8 ) Environment variables override tool name and path completely:
- environment variables can override the tool name and path completely
- 'AS' overrides gnu assembler tool
- 'AR' overrides gnu archiver tool
- 'LD' overrides gnu linker
- 'GCC' overrides gnu C compiler
- 'LLC' overrides LLVM compiler
- 'CLANG' overrides clang C compiler (currently never used)
- 'DLLTOOL' overrides gnu dlltool (GAS)
- 'GORC' overrides resource tool (if fbc was compiled with ENABLE_GORC)
- 'WINDRES' overrides resource tool (if fbc was compiled without ENABLE_GORC)
- 'CXBE' overrides xbox xbe generator tool
- 'DXE3GEN' overrides djgpp DOS dll tool
- 'EMAR' overrides emscripten archiver ool
- 'EMCC' overrides emscripten assember, compiler, and linker tools

I just realize now that I don't write any reason or purpose of these options. The short answer is that fbc's default options should work for native builds - that is build on and building for the same platform. When building for other platforms or as I find quite often developing and building with multiple tool chains, these options can help ease the needs of various non-native or uncommon compilations.
Post Reply