c++ and python stuf

Here you can suggest additions and modifications to LB Booster
bluatigro
Posts: 5
Joined: Sat Apr 14, 2018 6:35 am

c++ and python stuf

Post by bluatigro »

idea's from c++

Code: Select all


#include  ''working as in c++

#ifndef _module_h
#define _module_h

''so that this code is included only once

#endif

#replace a<b<c ((a)<(b)and((b)<(c))

''í use sub's and function's for this .
''but it may be useful for other's
#macro somemacro()

#endmacro
idea's from python

Code: Select all

''list's
l# = list#( 1 , 2 , 3 )
a# = b# + c#
q = len( l# )
a# = b#[ : : -1 ]
''dict's
d% = dict%( "a" ; 1 , "b" , 2 )
d% = { "a" ; 1 , "b" , 2 )
a% = b% + c%
q = b%( "a" ) 
''tuple's
t@ = tuple@( 1 , 2 , 3 )
t@ = ( 1 , 2 , 3 )
''tuple's are inmuteble so a@ = b@ + c@ is not good
''string's
a$ = a$[ : : -1 ]
''all
function f( no , s$ , l# , d% , t@ )
from freebasic

Code: Select all


''other color than other code for
( ) , + - * / ^ [ ] { } ;
''binary number's same color as other numbers
%1111000
''hex number's same color as other numbers
h&ffffff
''path incusion for ordering my module's
import "modules\openGL\bluaGL.bas"
''import same color as reserved word's
''true false and pi as fixed and color as reseved word's
const q = 13
const q$ = "hello"
''const list's dict's and tuple's too
''if you chage a const you have to get a error

i have in freebasic the folowing color's setting's in my ide :
remark's black on green bold
#stuf black on pink bold
symbol's black on yellow bold
reseved word's black on cyan bold
number's red on white normal [ also hex ]
string's literal's green on white normal
variable's and array's black on white normal
function's and sub name's black on white normal
selection white on blue normal
error white on red bold
background white

i want the same in LBB or that i can fix this in the ide myself
even better :
al in 1 line independently fixeble
bineary literal same as number
list's , dictoinary's and tuple's literal's same as string's

i need a null / nothing / none item too
guest
Site Admin
Posts: 196
Joined: Tue Apr 03, 2018 1:34 pm

Re: c++ and python stuf

Post by guest »

bluatigro wrote: Sat Apr 14, 2018 7:08 am I have in freebasic the folowing color's setting's in my ide
It's theoretically possible, but unfortunately the Syntax Coloring in LBB is done using assembly language code (because it's in a subclass routine) and it's not easy (or risk-free) to modify assembly language! I would be happy to publish the code here so that somebody could attempt the changes you are suggesting. Would that be helpful?
bineary literal same as number
You could do that now using the 'BBC BASIC escape' feature:

Code: Select all

    !myVariable = %1000101000111001
It could easily be added as a native LBB feature, perhaps as a bindec() function.
list's , dictoinary's and tuple's literal's same as string's
As you will appreciate, since LBB translates the program into BBC BASIC it's difficult to add features that BBC BASIC does not have, which includes those you have listed. If these data types can be represented internally as strings then something may be possible, but I am not very familiar with these concepts myself.
i need a null / nothing / none item too
You already have _NULL (which equates to zero, even in LB 4).

Richard.