Wiki improvements

Forum for discussion about the documentation project.
fxm
Posts: 9126
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Wiki improvements

Postby fxm » Jun 13, 2019 15:56

fxm wrote:
dodicat wrote:Maybe the Wiki is improved with the suffix change, but fb hasn't.
Large chunks of forum code no longer compile.
Why was that particular change made anyway?

This is one of the last fixes of dkl in the rev 1.06.0:
[fixed] (rev 1.06.0)
- #832: Fix bug allowing QB style suffixes on all keywords, regardless of -lang

@dkl,
Could you answer dodicat's questioning?
coderJeff
Site Admin
Posts: 3020
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: Wiki improvements

Postby coderJeff » Jun 16, 2019 18:43

I think the main point of bug report #832 was that fbc should error on suffixes used where they shouldn't be, like on keywords. However, this is still allowed by fbc (even with the "fix"):

Code: Select all

#lang "fblite"
if$ 1 then%
   print!
end if

For other use of suffixes in "-lang fb", like on variables, a warning with "-w pedantic" would probably be a better approach. If the usage doesn't actually break anything, it can be allowed, but I like the option of a pedantic warning that I can use fbc to help clean up source code if I want to remove suffixes.
fxm
Posts: 9126
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Wiki improvements

Postby fxm » Jul 04, 2019 19:30

@coderJeff,
about adding a new anchor (link to a location on the same page).

I added this note in /wiki/FBWikiFormatting documentation page:
Note about adding a new anchor:
- Don't pretest the new anchor link through the "Preview" mode, otherwise that cancels all changes in progress done with "Edit" (check only the added text associated with the new anchor).
- But execute "Store" to first save the adding in progress and quit the "Edit" mode, and only then, we can test in "operational" the functioning of the new link.

Because I had a good time before understanding this behavior.
fxm
Posts: 9126
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Wiki improvements

Postby fxm » Jul 21, 2019 6:20

'Recursion' page filled in the Programmer's Guide / Procedures:
- ProPgRecursion → fxm [new page created]
- CatPgProgrammer → fxm [added link to "Recursion" page]
- PrintToc → fxm [added link to "Recursion" page]
fxm
Posts: 9126
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Wiki improvements

Postby fxm » Jul 31, 2019 15:54

'Passing Arrays to Procedures' page filled in the Programmer's Guide / Variables and Datatypes / Arrays:
- ProPgPassingArrays → fxm [new page created]
- CatPgProgrammer → fxm [added link to "Passing Arrays to Procedures" page]
- PrintToc → fxm [added link to "Passing Arrays to Procedures" page]
fxm
Posts: 9126
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Wiki improvements

Postby fxm » Aug 02, 2019 15:21

'New and Delete' page filled in the Programmer's Guide / User Defined Types:
- ProPgNewDelete → fxm [new page created]
- CatPgProgrammer → fxm [added link to "New and Delete" page]
- PrintToc → fxm [added link to "New and Delete" page]
coderJeff
Site Admin
Posts: 3020
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: Wiki improvements

Postby coderJeff » Aug 05, 2019 15:01

fxm, the additions to the Programmer's Guide look really good. That's excellent work.

Off-topic:
There are a number of users on this forum with a native language other than english. In Ontario, Canada, we have two official languages, english and french. I have only completed the bare minimum in my education to read/write/speak french language, which honestly, the standard is quite low. So I always "think in english". But, I also know people that have either participated in french Immersion, or learned french as a child and later english as an adult. And for them, depending on the topic, they might either "think in english" or "penser en français". What made me think of this, is that your english is very good, even by native english language standards. Only every once in a while, I am reminded that you are native french language speaker, when I see for example "symbole" versus "symbol". Anyway, keep up the good work!

My question, if you are willing to share, do you "think in french", then translate to english? or are you mostly thinking in english when contemplating freebasic literature? Just my curiousity, thanks!
fxm
Posts: 9126
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Wiki improvements

Postby fxm » Aug 05, 2019 15:32

coderJeff wrote:do you "think in french", then translate to english? or are you mostly thinking in english when contemplating freebasic literature?
In my professional career, I worked for more than 40 years in the military technical field (air defense radar) in a large French company that I would not name.
By convention, all specifications of definition, verification, acceptance ... are directly written in English (American) and obviously the meetings with foreign customers (which are the most numerous).
I would not say that I think directly in English for all that is technical, but very often, ready-made phrases come to mind without translating the French words.
I would prefer to call it reflexes conditioned by 40 years of technical English writing (in non-technical English, I am much less fluent).

coderJeff wrote:Only every once in a while, I am reminded that you are native french language speaker, when I see for example "symbole" versus "symbol".
ProPgPassingArrays → fxm [corrected misspelling]
fxm
Posts: 9126
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Wiki improvements

Postby fxm » Aug 06, 2019 18:19

@coderJeff,

I assume that the "Iterators" page (in "Programmer's Guide / User Defined Types") only concerns the overloading of the For/Next/Step operators.
The pre-defined [For...Next] block (for intrinsic scalars only) being covered in the "Programmer's Guide / Statements and Expressions / Control Flow Statements" page.

Am I right?
coderJeff
Site Admin
Posts: 3020
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: Wiki improvements

Postby coderJeff » Aug 06, 2019 20:52

Yes, I would say you are right.

I am sure you have noticed by now there are a few different styles of pages in the Programmer's Guide, by different authors, or even same author. Probably just trying out different ideas at the time.

Like,
ProPgControlFlow
CatPgControlFlow

Both providing links to the keyword pages, though the Pro Guide has a little more description.
fxm
Posts: 9126
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Wiki improvements

Postby fxm » Aug 07, 2019 21:23

fxm wrote:@coderJeff,

I assume that the "Iterators" page (in "Programmer's Guide / User Defined Types") only concerns the overloading of the For/Next/Step operators.
The pre-defined [For...Next] block (for intrinsic scalars only) being covered in the "Programmer's Guide / Statements and Expressions / Control Flow Statements" page.

Am I right?
coderJeff wrote:Yes, I would say you are right.

OK.
Now, I'm starting to work on this page ("Iterators").
fxm
Posts: 9126
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Wiki improvements

Postby fxm » Aug 08, 2019 20:10

'Iterators' page filled in the Programmer's Guide / User Defined Types:
- ProPgTypeIterators → fxm [new page created]
- CatPgProgrammer → fxm [added link to "Iterators" page]
- PrintToc → fxm [added link to "Iterators" page]
fxm
Posts: 9126
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Wiki improvements

Postby fxm » Aug 09, 2019 15:40

Jeff,

While working on the "Iterators" page, I discovered that the access rights (as private, protected and public) of the overload iterating operators (For, Next and Step) are not taken into account by the For...Loop statement.
By cons (for example), that works well for the overload operators New([]) and Delete([]) when called from New([]) expression and Delete([]) statement.

FX

Bug report filled in:
#908 Access rights of overload For/​Next/​Step operators not taken into account by For...Loop statement
fxm
Posts: 9126
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Wiki improvements

Postby fxm » Aug 12, 2019 8:47

speedfixer wrote:I would change the title in CatPgProgrammer of 'Variable Scope' to 'Variable Scope (and lifetime)' and extend the ProPgVariableScope page a little. They aren't the same topic, but most beginners confuse the two and need to know more about scope than lifetime, anyway. Then get rid of the empty placeholder for 'Variable Lifetime' in CatPgProgrammer.

I agree with this remark and I too would have created a single page, for example "Variable Scope and Lifetime" (ProPgVariableScope) in the "Declarations" section.

What do you think, Jeff?
coderJeff
Site Admin
Posts: 3020
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: Wiki improvements

Postby coderJeff » Aug 12, 2019 12:02

fxm wrote:
speedfixer wrote:I would change the title in CatPgProgrammer of 'Variable Scope' to 'Variable Scope (and lifetime)' and extend the ProPgVariableScope page a little. They aren't the same topic, but most beginners confuse the two and need to know more about scope than lifetime, anyway. Then get rid of the empty placeholder for 'Variable Lifetime' in CatPgProgrammer.

I agree with this remark and I too would have created a single page, for example "Variable Scope and Lifetime" (ProPgVariableScope) in the "Declarations" section.

What do you think, Jeff?


I agree also. The lifetime of a variable is most often directly related to it's scope, so it makes sense to give some treatment of both in the same topic.

I think the scope and lifetime concepts can diverge though, when user is managing memory themselves, with allocate/deallocate, imagecreate/imagedelete, new/delete also for dynamic arrays that are resized or erased. A variable follows the scope and lifetime rules as expected, but the global memory referred to can continue to exist and be modified outside of an individual variable's lifetime.

Also, for example, a static variable inside a procedure has local scope but lifetime for the duration of the running program. Some other variable, like a pointer or byref return can safely refer to the global data, even though the scope of the variable is different. In this sense the variable which refers to the global data, has different scope and lifetime than that of the data to which it refers. You can see this also where a pointer in an inner scope block refers to a local variable or parameter in an outer scope block.

Return to “Documentation”

Who is online

Users browsing this forum: No registered users and 36 guests