Than we have the embedded comment problem, plus detecting /* / */ in already
commented lines (#). All too many problems with
little gain IMO. Not to mention /* appearing as regular and valid file
items:
---
src/*.prg
---

Brgds,
Viktor

On Sat, May 2, 2009 at 9:15 PM, Pritpal Bedi <[email protected]>wrote:

>
> Hi
>
> Here is what I placed at the end of hbmk.prg to strip commented block:
>
> STATIC FUNCTION StripCommnets( cFile )
>   LOCAL n, n1
>
>   DO WHILE .T.
>      IF ( n := at( '/*', cFile ) ) == 0
>         EXIT
>      ENDIF
>      IF ( n1 := at( '*/', cFile ) ) == 0
>         EXIT
>      ENDIF
>
>      cFile := SubStr( cFile, 1, n-1 ) + SubStr( cFile, n1+2 )
>   ENDDO
>
>   RETURN cFile
>
> And then in:
>
> STATIC PROCEDURE HBM_Load( aParams, cFileName, /* @ */ nEmbedLevel )
>   LOCAL cFile
>   LOCAL cLine
>   LOCAL cParam
>
>   IF hb_FileExists( cFileName )
>
>      cFile := MemoRead( cFileName ) /* NOTE: Intentionally using MemoRead()
> which handles EOF char. */
>       cFile := StripCommnets( cFile )
> ...
>
> Regards
> Pritpal Bedi
>
> --
> View this message in context:
> http://www.nabble.com/HBMK2---Few-Changes-tp23348709p23349387.html
> Sent from the Harbour - Dev mailing list archive at Nabble.com.
>
> _______________________________________________
> Harbour mailing list
> [email protected]
> http://lists.harbour-project.org/mailman/listinfo/harbour
>
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to