Search found 10177 matches

by fxm
Mar 03, 2021 14:11
Forum: Documentation
Topic: String index doc
Replies: 42
Views: 767

Re: String index doc

4 operators which return by reference have in their documentation page a single syntax of 'Usage', which can be misleading for a novice (suggesting the only feature "get"). Example for the Operator [] (String index): Usage: result = lhs [ rhs ] I propose to add a second syntax also sugges...
by fxm
Mar 03, 2021 13:47
Forum: Documentation
Topic: String index doc
Replies: 42
Views: 767

Re: String index doc

Otherwise, I think the example I complemented in the docs is pretty straightforward: Dim a As String = "Hello, world!" Dim i As Integer For i = 0 To Len(a) - 1 Print Chr(a[i]) & " "; Next i Print Print For i = 1 To 4 a[i] = a[i] - 32 ' converting lowercase alphabetic characte...
by fxm
Mar 03, 2021 13:42
Forum: Documentation
Topic: String index doc
Replies: 42
Views: 767

Re: String index doc

The problem here is that the operator [] can work, in get mode, in two different ways , and the only apparent difference lies in the Dim ByRef: Dim a As String = "Hello world" Dim ByRef As ubyte r=a[6] ' the operator [] returns a REFERENCE, which can be used e.g. as r=123 Dim As ubyte...
by fxm
Mar 03, 2021 9:38
Forum: Documentation
Topic: String index doc
Replies: 42
Views: 767

Re: String index doc

4 operators which return by reference have in their documentation page a single syntax of 'Usage', which can be misleading for a novice (suggesting the only feature "get"). Example for the Operator [] (String index): Usage: result = lhs [ rhs ] I propose to add a second syntax also suggest...
by fxm
Mar 02, 2021 19:55
Forum: Community Discussion
Topic: Moderators, FB community
Replies: 9
Views: 289

Re: Moderators, FB community

It seems to me that by unlocking this thread, I thus apologized for having locked it.
But what untruths I read there for 2 days.
by fxm
Mar 02, 2021 19:27
Forum: Documentation
Topic: String index doc
Replies: 42
Views: 767

Re: String index doc

With everything I added in this doc page, I think I'm listening a bit to comments and suggestions, even a little to the detriment of concision.
by fxm
Mar 02, 2021 18:53
Forum: Community Discussion
Topic: Moderators, FB community
Replies: 9
Views: 289

Re: Moderators, FB community

I do not see the problem.

I moved your post (viewtopic.php?p=280820#p280820) to the thread you wanted to reply to, but which I had temporarily locked for about 10 hours.

On the other hand, please stop the insults.
by fxm
Mar 02, 2021 17:50
Forum: Documentation
Topic: String index doc
Replies: 42
Views: 767

Re: String index doc

'Dim As Integer c = a[6]' only copies 'a[6]' in the variable 'c' , therefore 'c' is not created as reference. But 'Dim Byref As Integer r = a[6]' creates a reference 'r' to 'a[6]' which is already a reference to the 7th character of the string...
by fxm
Mar 02, 2021 15:49
Forum: Documentation
Topic: String index doc
Replies: 42
Views: 767

Re: String index doc

Give its opinion on the merit of underlining that this operator returns a reference by adjudging that it is rather a detail to be reported at the end of the description, and at the same time admit not knowing what is actually a reference and even not being interested in that (even if I offered some ...
by fxm
Mar 02, 2021 11:32
Forum: Documentation
Topic: String index doc
Replies: 42
Views: 767

Re: String index doc

I wanted to clarify that the reference is of numeric type and not of type string for example, but ok for your proposal.
by fxm
Mar 02, 2021 10:10
Forum: Community Discussion
Topic: Moderators, FB community
Replies: 9
Views: 289

Re: Moderators, FB community

I unlocked the original thread and therefore moved your post to put it there.
by fxm
Mar 02, 2021 9:12
Forum: Documentation
Topic: String index doc
Replies: 42
Views: 767

Re: String index doc

I have unlocked the topic, but please, for those who are not quite sure what a REFERENCE is, read these two articles: - From Pointers to References - Using References before arguing about the need to specify it at the beginning of the page, or only at the end of the description (as a detail). The di...
by fxm
Mar 01, 2021 22:35
Forum: Documentation
Topic: String index doc
Replies: 42
Views: 767

Re: String index doc

fxm wrote: continuing this discussion is fruitless.

I locked this topic.
by fxm
Mar 01, 2021 22:06
Forum: Documentation
Topic: String index doc
Replies: 42
Views: 767

Re: String index doc

Under the hood, its returns a pointer by value, which is implicitly dereferenced. It is exactly the definition of a reference in FreeBASIC (an internal pointer implicitly dereferenced). See in the Programmer's Guide my two articles in the topic 'Variables and Datatypes / References'. Having said al...
by fxm
Mar 01, 2021 20:10
Forum: Documentation
Topic: String index doc
Replies: 42
Views: 767

Re: String index doc

it returns the numeric value of the char inside the string a at position n Precisely. Not just that. It also allows you to modify the value of the character at position n (which a simple copy cannot do). This entity (a kind of alias) which makes it possible to read and modify the value of a variabl...

Go to advanced search