|
Post by bluatigro on Apr 13, 2018 0:09:46 GMT -5
idea's from c++ :
#ifndef somemodule_h #define somemodule_h
''so this code wil be imported once
#endif
''this is useful too
#replace a<b<c ((a)<(b))and((b)<(c))
''i don't know if i need this
#macro somemarco ''some code #endmacro
all # has to have a different color than othercode
from python
''list's list# = [ 1 , 2 , 3 , 4 , 5 ] list# = list( 1 , 2 , 3 , 4 ) list# = list#[ 1 : 3 , -1 ]
a = len( list# ) q# = a# + b# ''dictonary's dict% = dict() dict% = { "a" ; 1 , "b" , 2 } dict%[ "a" ] = 5 a = len( dict% ) q% = a% + b% ''tuple's tuple@ = tuple( 1 , ) tuple@ = ( 1 , ) a = len( tuple@ ) ''tuple's are inmuteble so q@ = a@ + b@ is not good ''string's part$ = a$[ -5 , -2 ] ''list dict and tuple same color as reseved word's ''@carl : the symvol's may be different but you get the point
basic extentions
''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
a transparent yellow circle around the mouse [ choise ] a old style cursor [ choise ] this is useful for people whit eyeproblem's
|
|
|
Post by bluatigro on Apr 13, 2018 2:34:08 GMT -5
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 LB5 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
|
|
|
Post by Carl Gundel on Apr 13, 2018 6:37:39 GMT -5
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 LB5 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 Customizable syntax colors are important to me also, so I will try to put them into LB5.
|
|
|
Post by Carl Gundel on Apr 13, 2018 6:41:02 GMT -5
I will certainly consider features from other languages, but I tend to shy away from alien language features because I don't want LB to begin to look really weird.
|
|
|
Post by bluatigro on Apr 14, 2018 2:42:37 GMT -5
@carl :
coding a language is a lot of work so i understand
and i have some idea what you can do whit LB5 if you put it all in
the code wil get verry strange indeed
but verry powerful
do at least :
#include "modules\openGL\blueGL.bas" swap a , b swap a(1) , a(2) swap a$ , b$ swap a$( 1 ) , a$( 2 ) ''byref on array's a = -a a = sng( a ) ''return's : 1 for > 0 , 0 for = 0 and -1 for < 0 ''these things i realy missing
|
|
|
Post by Chris Iverson on Apr 16, 2018 11:33:41 GMT -5
If I could have a wish for one feature from Python, it would be the ease of which it handles arrays/lists(including how strings are automatically considered to be arrays of characters when useful). Particularly, array slicing. Need to strip out the first, second, and last items of the array? newArray = oldArray[2:-1] Done. (This came in handy when I wrote the code for scraping the conforums.) Need to reverse a string? myStr = "whee" revStr = myStr[::-1] #revStr is now "eehw" Formatting a number with a forced number of prefixed zeros for a standard length? num = 12 formatNum = ("0000" + str(num))[-4:] #formatNum is now "0012" See the main answer here for more info: stackoverflow.com/questions/509211/understanding-pythons-slice-notation
|
|
|
Post by Carl Gundel on Apr 16, 2018 11:38:43 GMT -5
Chris,
Very useful, I agree. But ugly, from a BASIC sense of style.
|
|
|
Post by Chris Iverson on Apr 16, 2018 12:07:42 GMT -5
Ah, true, that's a good point. Hmm.
Oh, well. Honestly, as long as we get expanded ability to work with arrays/structs as a first-class type(something which I believe has already been shown in previous LB5 alpha builds, although it's been a LONG time since I've played with one of them), I'll be happy. This would just be icing on the cake.
|
|
Sver
Full Member
Posts: 145
|
Post by Sver on Apr 17, 2018 9:37:47 GMT -5
More usefull : Something like GETGPS or to get other sensor information, when you use a windows tablet. That 'll make LB more attractive for lot of people.
Or example's
|
|
|
Post by bluatigro on Apr 18, 2018 7:53:38 GMT -5
@ chris
it can already be done whit strings
a$ = "abcdefghijklmnopqrstuvwxyz" print "a$ = " ; a$ print "newstr$( a$ , 5 , 15 , 1 ) = " ; newstr$( a$ , 5 , 15 , 1 ) print "newstr$( a$ , 5 , 15 , -1 ) = " ; newstr$( a$ , 5 , 15 , -1 ) print "newstr$( a$ , 5 , -5 , 1 ) = " ; newstr$( a$ , 5 , -5 , 1 ) print "newstr$( a$ , 5 , -5 , -1 ) = " ; newstr$( a$ , 5 , -5 , -1 )
end function newstr$( in$ , a , b , c ) if a < 0 then a = a + len( in$ ) + 1 end if if b < 0 then b = b + len( in$ ) + 1 end if if c > 0 then for i = a to b step c uit$ = uit$ + mid$( in$ , i , 1 ) next i end if if c < 0 then for i = b to a step c uit$ = uit$ + mid$( in$ , i , 1 ) next i end if newstr$ = uit$ end function
|
|