Syntax highlight in these forums

Syntax highlight in these forums

Postby Antonio Linares » Sun Feb 15, 2009 3:07 am

We use "\[code\]" and "\[/code\]" to set a block of code in these forums.

Now, if you want FiveWin syntax highlight, then specify "\[code=fw\]" and "\[/code\]"

Please remove the "\" in the previous tags. We will improve the FiveWin highlighted clauses and PRG language in the next days.

You can use other languages names, any of these:
abap|actionscript|ada|apache|applescript|asm|asp|autoit|bash|blitzbasic|bnf|c|caddcl|cadlisp|cfdg|cfm|cpp-qt|cpp|csharp|css|c_mac|d|delphi|diff|div|dos|dot|eiffel|fortran|freebasic|fw|genero|gml|groovy|haskell|html|html4strict|idl|ini|inno|io|java|java5|js|latex|lisp|lua|m68k|matlab|mirc|mpasm|mysql|nsis|objc|ocaml-brief|ocaml|oobas|oracle8|pascal|per|perl|php-brief|php|plsql|python|qbasic|rails|reg|robots|ruby|sas|scheme|sdlbasic|smalltalk|smarty|sql|tcl|text|thinbasic|tsql|vb|vbnet|vhdl|visualfoxpro|winbatch|xml|xpp|xsl|z80
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42117
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Syntax highlight in these forums

Postby Antonio Linares » Sun Feb 15, 2009 3:16 am

Example:
Code: Select all  Expand view  RUN
 
// this is a comment
 
#include "FiveWin.ch"
 
function Main()
 
   local oWnd
 
   DEFINE WINDOW oWnd TITLE "Hello world!"
 
   ACTIVATE WINDOW oWnd
 
return nil
 
/*
   multiline
   comment
*/

 
CLASS Test
 
   DATA One
 
   METHOD New()
 
ENDCLASS
 
#pragma BEGINDUMP
 
#include <hbapi.h>
 
HB_FUNC( TEST )
{
   hb_retc( "Hello world!" );
}
 
#pragma ENDDUMP
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42117
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Syntax highlight in these forums

Postby anserkk » Sun Feb 15, 2009 9:11 am

Dear Mr.Antonio,

This is a very good feature. :) Thank you very much

Regards

Anser
User avatar
anserkk
 
Posts: 1333
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: Syntax highlight in these forums

Postby betoncu » Mon Feb 16, 2009 7:08 pm

Antonio,
It looks very nice.
Do you have a wordfile for Ultraedit?

Regards,
Birol Betoncu
Birol Betoncu
birol.betoncu@gmail.com
Using Harbour, FWH 19.05, BCC7
User avatar
betoncu
 
Posts: 126
Joined: Sat Oct 08, 2005 9:38 pm
Location: Cyprus (North)

Re: Syntax highlight in these forums

Postby Antonio Linares » Mon Feb 16, 2009 7:29 pm

Birol,

Here you have it. It is not 100% complete, but you can easily add new keywords to it :-)

You have to add it at the bottom of wordfile....:

/L14"Clipper" Nocase Line Comment = // Block Comment On = /* Block Comment Off = */ File Extensions = PRG CH
/Function String 1 = "%*^{Function^}^{Method^}*[(]"
/Function String 2 = "%Class"
/Function String 3 = "%Procedure"
/Function String 4 = "%*INLINE"
/Function String 5 = "%HB_FUNC"
/Open Fold Strings = "from" "{" "static function" "init function" "exit function" "function" "if" "while" "TRY" "for" "method"
/Close Fold Strings = "}" "return" "return nil" "endif" "endwhile" "end" "next" "return nil" "endclass"
/C1
.and. .not. .or. .t. .f.
#include #define #ifdef #endif #else
aadd abs aclone acopy adel aeval afill ains alert alias alltrim as asc array activate action append asize ascan
begin button buttonbar brush break
case class classdata close color colors checkbox create character column centered commit copy constructor
date do data dblclick declare deleted default delete design device dialog define dbcloseall dbskip dbclosearea dbsetorder dbseek dbrelation dbsetrelation dbgobottom dbgotop dbgoto dbsetfilter dbusearea dbcommit dbrecall dbdelete dbunlock dbappend
exit else elseif endif export empty endclass endcase end endmenu enddo endpage endprint erase eof eval exact
file for function from of footer font filter field fieldget fieldput fcount flock ferase fields
get go goto gotop
hidden header headers
icon id if iif inline index init in
left len locate listbox listview loop lower
maximized mdichild method memvar msgInfo msgBeep message menu menuitem msglogo
next numeric name
of otherwise on off order ordsetfocus
path pixel protected print page parameters procedure prompts preview picture
quit
return recall resource resources redefine read report replace right rlock recno
sizes sequence self super set say separator size style sysrefresh shared select store skip seek softseek
time title tone to tooltip top total transform
var val valid valtype
while when window with
use update upper
zap
/C2
new
/C3
local
static
public
private
nil
:
,
;
@
|
{
}
(
)
.
[
]
<
>
=
!
+
-
*
/
%
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42117
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Syntax highlight in these forums

Postby betoncu » Mon Feb 16, 2009 9:08 pm

Thank you very much.

Birol
Birol Betoncu
birol.betoncu@gmail.com
Using Harbour, FWH 19.05, BCC7
User avatar
betoncu
 
Posts: 126
Joined: Sat Oct 08, 2005 9:38 pm
Location: Cyprus (North)


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 99 guests