Basic editor and key-words

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Basic editor and key-words

FR web forum
Hello dev,

When I write a Basic program, some words are blue to show me that are reserved.
But much are missing and display in green (like LBound or UBound).
Where these key-words are stored?

Thanks

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Basic editor and key-words

Andrea Pescetti-2
On 30/12/2015 FR web forum wrote:
> When I write a Basic program, some words are blue to show me that are reserved.
> But much are missing and display in green (like LBound or UBound).
> Where these key-words are stored?

Looks like they are here:

http://svn.apache.org/viewvc/openoffice/trunk/main/svtools/source/edit/syntaxhighlight.cxx?view=markup#l33

but I haven't tried to add one and rebuild; I can check further if useful.

Regards,
   Andrea.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Basic editor and key-words

Mathias Röllig
In reply to this post by FR web forum
Hello FR web,

> When I write a Basic program, some words are blue to show me that are reserved.
> But much are missing and display in green (like LBound or UBound).
> Where these key-words are stored?


There is a difference between reserved words and (predefined) function
names. This belongs to ALL programming languages.

--------------------------
Option Explicit

Sub Main
        Dim lBound As Integer
        Dim uBound As Integer
        lBound = 0
        uBound = 2
        Dim a( lBound To uBound ) As Integer
        Dim i As Integer
        For i = lBound To uBound
                a( i ) = 10 * i + 5
        Next i
        For i = LBound( a ) To UBound( a )
                print a( i ),
        Next i
End Sub
--------------------------

LBound and UBound are not reserved words.


Regards, Mathias

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Basic editor and key-words

FR web forum
>There is a difference between reserved words and (predefined) function
>names. This belongs to ALL programming languages.

>LBound and UBound are not reserved words.

OK the goal is to help programmers
So we can have a different color for predefined functions?

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

SOS
Reply | Threaded
Open this post in threaded view
|

Re: Basic editor and key-words

SOS
In reply to this post by FR web forum




Sent from my Samsung Galaxy smartphone.-------- Original message --------From: FR web forum <[hidden email]> Date: 31/12/2015  17:39  (GMT+01:00) To: [hidden email] Subject: Re: Basic editor and key-words
>There is a difference between reserved words and (predefined) function
>names. This belongs to ALL programming languages.

>LBound and UBound are not reserved words.

OK the goal is to help programmers
So we can have a different color for predefined functions?

+1  and have a tool to list this functions I do a lot of basic coding and also a lot of Googling to find functions I need :-)
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Basic editor and key-words

Mathias Röllig
In reply to this post by FR web forum
>> There is a difference between reserved words and (predefined) function
>> names. This belongs to ALL programming languages.
>
>> LBound and UBound are not reserved words.
>
> OK the goal is to help programmers
> So we can have a different color for predefined functions?

I don't think that it would make sense.
How can the names be passed to the parser?
Maybe all names will collected in a separate array.

But what is with own SUBs and FUNCTIONs?
What is with SUBs and FUNCTIONs inside available modules and provided by
some extensions?
What is with the methods of an object?

Maybe there will be a powerful IDE like Eclipse or NetBeans that can do
an online parsing.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Basic editor and key-words

FR web forum

>> There is a difference between reserved words and (predefined) function
>> names. This belongs to ALL programming languages.
>
>>> LBound and UBound are not reserved words.
>
>> OK the goal is to help programmers
>> So we can have a different color for predefined functions?

>I don't think that it would make sense.
>How can the names be passed to the parser?
>Maybe all names will collected in a separate array.

>But what is with own SUBs and FUNCTIONs?

I'm just talking about words listed in Basic helpfile.
LBound, UBound, Msgbox, UCase, LCase, etc

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]