Wiki improvements

Forum for discussion about the documentation project.
SARG
Posts: 1260
Joined: May 27, 2005 7:15
Location: FRANCE

Re: Wiki improvements

Postby SARG » Nov 30, 2020 14:17

I read also this but it's more like an example for finding an explicit name.
fxm
Moderator
Posts: 10375
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Wiki improvements

Postby fxm » Dec 28, 2020 13:33

changelog.txt:
Version 1.08.0

[changed]
.....
- fbc: double the minimum and default stacksize on 64-bit to 64Kb and 2048Kb respectively.
.....

Documentation update:
- CompilerCmdLine → fxm [default stack size doubled for 64-bit targets]
- CatPgCompOpt → fxm [default stack size doubled for 64-bit targets]
- CompilerOptt → fxm [default stack size doubled for 64-bit targets]
- CompilerFAQ → fxm [default stack size doubled for 64-bit targets]
- ProPgDynamicMemory → fxm [default stack size doubled for 64-bit targets]
coderJeff
Site Admin
Posts: 3507
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: Wiki improvements

Postby coderJeff » Dec 28, 2020 13:51

fxm, you are the best! If it weren't for your help I'm sure I would forget to document ... everything. :)

There's an old post about some missing docs. Exe formats and gfx formats. Do you mind re-posting that? Plus any new stuff? I'll do my best to fill in some details.
fxm
Moderator
Posts: 10375
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Wiki improvements

Postby fxm » Dec 28, 2020 14:12

I guess you're talking about this one: Missing Documentation
Missing Documentation
Please edit this page to remove items when they are written or add items when they are noticed.

Missing/Incomplete/Outdated Pages
Pages missing/incorrect examples
    None known (but if found, please edit this page)
Misc wishlist
    Warn in all non-portable or "evil" examples
    Consistent policy about "FB version diff" KeyPgImageInfo KeyPgRem
    FB source file size limit
    "returning references" stuff (PEEK, (), [], ... total 7 pages BUMP'ed today)
    "-gen GCC" document how to get it working (esp. in DOS)

I did everything I could in relation to these shortcomings, but I am reaching my limits of knowledge here.
SARG
Posts: 1260
Joined: May 27, 2005 7:15
Location: FRANCE

Re: Wiki improvements

Postby SARG » Dec 28, 2020 19:46

coderJeff wrote: If it weren't for your help I'm sure I would forget to document ... everything. :)

Also my fault because it was my request and we both coded it.
Thank you fxm.

Btw I have to finish some docs about 64bit assembly (requested by D.J.Peter). I hope before end of january.
coderJeff
Site Admin
Posts: 3507
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: Wiki improvements

Postby coderJeff » Dec 30, 2020 13:03

fxm wrote:I guess you're talking about this one: Missing Documentation

Yes, exactly. Thank-you for collecting everything there.

"dedicated page for qb screen statement" was added back in 2009.
@counting_pine, do you remember the reason? I feel like one page for screen should be good.
counting_pine
Site Admin
Posts: 6287
Joined: Jul 05, 2005 17:32
Location: Manchester, Lancs

Re: Wiki improvements

Postby counting_pine » Dec 31, 2020 10:08

Mainly just to clean things up a bit I think. At the time, I maybe thought that lang qb users could do with more tailored documentation? I don’t know...
I half thought the active/visible page parameters were only available in Lang qb, but it looks like lang fb has its own syntax for that too. Maybe the “Differences from QB” section just needs to be clearer on that.

But since it has the same functionality available as lang qb, splitting the page maybe wouldn’t streamline things that much.
I don’t mind if it stays the way it is, particularly if the issue has been sitting in someone else’s backlog for 11 years!
badidea
Posts: 2333
Joined: May 24, 2007 22:10
Location: The Netherlands

Re: Wiki improvements

Postby badidea » Feb 19, 2021 23:05

Does anyone object if I split the first example on https://freebasic.net/wiki/KeyPgOpNew into 2 examples?
The use of 'Scope / End Scope' might be a nice example for the use of 'Scope', but only confusing on the 'New' page.

BTW: The forum seems a bit broken at the moment here, I hope it is only temporary.
fxm
Moderator
Posts: 10375
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Wiki improvements

Postby fxm » Feb 19, 2021 23:22

Or, in the example, just remove both scopes but use 2 different pointer names.
badidea
Posts: 2333
Joined: May 24, 2007 22:10
Location: The Netherlands

Re: Wiki improvements

Postby badidea » Feb 20, 2021 0:22

I decide to split the example. This was more in line with the 3rd example (1st = new / single element, 2nd = new [], 1D-array, 3rd = new [], 2D-array).
The 2nd example is a bit boring, nothing was printed. I added "Done.", to give at least some feedback.
The 3rd example (untouched by me) is not for a beginner, with: Dim As UDT Ptr Ptr p = New UDT Ptr [4]
fxm
Moderator
Posts: 10375
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Wiki improvements

Postby fxm » Feb 20, 2021 5:58

I just modified the second filename because 2 examples cannot have the same filename.

Fortunately, in the reference documentation there are not only examples for beginners!
fxm
Moderator
Posts: 10375
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Wiki improvements

Postby fxm » May 14, 2021 12:31

fxm wrote:
fxm wrote:I will perhaps soon (if no one does before) devote myself to completing the 'Executables' article in the 'Programmer's Guide' ('Making Binaries' section), from the above Jeff's posts and by synthesizing there only the information most useful to a programmer.

ProPgExecutables → fxm [page complemented]
To finalize the 'Programmer's Guide', only the 'External Graphics File Formats' page (in 'Graphics') remains to be completely filled in.
Are there any volunteers?
fxm
Moderator
Posts: 10375
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Wiki improvements

Postby fxm » May 17, 2021 18:34

@CoderJeff:

I do not understand this change:
- Change overload for SCREENCONTROL( byval as const long, byref as long = -2147483648, byref as long = -2147483648, byref as long = -2147483648, byref as long = -2147483648 )
- Add overload for SCREENCONTROL( byval as const long, byref as longint, byref as longint = -2147483648, byref as longint = -2147483648, byref as longint = -2147483648 )
compared to the present syntax:
declare sub ScreenControl ( byval what as long, byref param1 as integer = 0, byref param2 as integer = 0, byref param3 as integer = 0, byref param4 as integer = 0 )
declare sub ScreenControl ( byval what as long, byref param as string = "" )
Most significant bit for the long default type passed to 1?
(I'm not talking about the '= -2147483648' term which seems to be missing once in the second overload)

No problem for changing SCREENINFO and IMAGEINFO.
coderJeff
Site Admin
Posts: 3507
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: Wiki improvements

Postby coderJeff » May 18, 2021 0:32

In the LONG (or INTEGER<32>) versions of the functions, parameters are optional as per previous documentation:
- SCREENCONTROL(what [,param1 [,param2 [,param3 [,param4]]]] )
- SCREENINFO( [width [,height [,depth [,bpp [,pitch [,refresh_rate [, driver]]]]]]] )
- IMAGEINFO( img [,width [,height [,bpp [,pitch [,imagedata [,size]]]]]] )

In the LONGINT (or INTEGER<64>) versions of the functions, the first 2 or 3 parameters are not optional:
- SCREENCONTROL( what, param1 [,param2 [,param3 [,param4]]] )
- SCREENINFO( width, height [,depth [,bpp [,pitch [,refresh_rate [, driver]]]]] )
- IMAGEINFO( img, width, height [,bpp [,pitch [,imagedata [,size]]]] )

It must be this way so that the procedure overload between the LONG and LONGINT versions can be resolved.

From fbc sources:

Code: Select all

declare sub screencontrol overload _
   ( _
      byval what as const long, _
      byref param as string _
   )

declare sub screencontrol overload _
   ( _
      byval what as const long, _
      byref param1 as long = &h80000000, _
      byref param2 as long = &h80000000, _
      byref param3 as long = &h80000000, _
      byref param4 as long = &h80000000 _
   )
   
declare sub screencontrol overload _
   ( _
      byval what as const long, _
      byref param1 as longint, _
      byref param2 as longint = &h80000000, _
      byref param3 as longint = &h80000000, _
      byref param4 as longint = &h80000000 _
   )

declare sub screeninfo overload _
   ( _
      byref width as long = 0, _
      byref height as long = 0, _
      byref depth as long = 0, _
      byref bpp as long = 0, _
      byref pitch as long = 0, _
      byref refresh_rate as long = 0, _
      byref driver as string = "" _
   )

declare sub screeninfo overload _
   ( _
      byref width as longint, _
      byref height as longint, _
      byref depth as longint = 0, _
      byref bpp as longint = 0, _
      byref pitch as longint = 0, _
      byref refresh_rate as longint = 0, _
      byref driver as string = "" _
   )

declare function imageinfo_ overload _
   ( _
      byval img     as const any ptr, _
      byref width   as long = 0, _
      byref height  as long = 0, _
      byref bpp     as long = 0, _
      byref pitch   as long = 0, _
      byref imgdata as any ptr = 0, _
      byref size     as long = 0 _
   ) as long

declare function imageinfo_ overload _
   ( _
      byval img     as const any ptr, _
      byref width   as longint, _
      byref height  as longint, _
      byref bpp     as longint = 0, _
      byref pitch   as longint = 0, _
      byref imgdata as any ptr = 0, _
      byref size     as longint = 0 _
   ) as long
fxm
Moderator
Posts: 10375
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Wiki improvements

Postby fxm » May 18, 2021 5:54

Thanks.

Return to “Documentation”

Who is online

Users browsing this forum: No registered users and 3 guests