Dynamic Command Highlighting?

Blitz3D Forums/Blitz3D Beginners Area/Dynamic Command Highlighting?

SSS(Posted 2003) [#1]
hi everyone, i wasnt exactly shure where to post this, im @ school right now but i had an idea, what if you made a C++/PureBasic file, and added all the 'Major' functions that you use in you programs with the same input etc... but make them empty, then compile it, and put the file + the .dcls file in the Userlib file. then since blitz DOES NOT reserve key words, the blank C++ commands would be overloaded and you would get Command Highlighting for any function you wanted, its just an idea which i will test when i get home :D

tell me what you think


Tricky(Posted 2003) [#2]
A lot of incomprehensible information, but let's say...

But if I understood well, it could be that you want "Print" to be highlighted diffrently in a diffrent color because you use it much and so you put it in your highlight list and then it would be...

AppTitle "Test program"
Print "Hello there..."
A$ = Input("What is yer name?")
Print "Hello there: "+A$
End

Is this what you mean?


SSS(Posted 2003) [#3]
nope not at all, but in re reading my post it was quite confusing...
iv tested it out and it works tho, so here is a beter explanation

let us say you wanted syntax highlighting of the command UpdateAI()
then what you could do is make a dll which had the function UpdateAI() in it, you could then make a dcls file in which you had UpdateAI():"_UpdateAI@0"
then in your main code it would be like this
function UpdateAI()
    ;Update Code in here
end function 


your function updateAI would now be highlighted like Graphics, Print, or Input etc...
is that clearer, i hope someone finds that usefull
:D


Tricky(Posted 2003) [#4]
In other words, all homemade functions will be highlighted as well, just as internal Blitz commands... Do I get the information better this time?


SSS(Posted 2003) [#5]
yup, but only the ones in your .dcls file


Koriolis(Posted 2003) [#6]
That perfectly makes sense, but Jedive mentioned in another thread that you can even make "fake" .decls files and get syntax highlighting, without any need for such a fake DLL. Check this thread.


SSS(Posted 2003) [#7]
oh, i hadnt seen that + i had right after i posted figured out the fake part :D


Tricky(Posted 2003) [#8]
yup, but only the ones in your .dcls file


Is good... If you could turn your normal Functions also into highlight (only if you wish), this would be really good...


Koriolis(Posted 2003) [#9]
This is exactly what we're talking about: syntax highlighting for normal Blitz function by doing fake .decls for these functions. You should also check the thread.


MadMax(Posted 2003) [#10]
Hey, that looks nice, but what is a .decls and could someone explain exactly how to do this to someone as thick as me?


Koriolis(Posted 2003) [#11]
Check the thread I mentioned, Jedive has already given some example.