Page 5 of 104

Posted: Thu Feb 16, 2006 3:49 pm
by THCM
Nice to see a new maintainer for Japbe! I think I'll switch back to Japbe! Thanx!

Posted: Thu Feb 16, 2006 3:50 pm
by RichardL
Hi,

That was quick! I still like the concept very much...

Some comments:

1. Lines with no code and a comment should (a) be left un-touched or (b) tabbed to the same as the first character on the last non-blank line.

2. If the comment cannot go at the wanted indent because a code line is too long then (a) leave it alone or (b) move it to the end of the code +1. At present it damages the code!

Here are some example

Code: Select all

; Original
P=42 ; The real meaning
; This comment should stay left aligned, it is a description for the block of code
For n = 1 To 1000 ; This line ends with 1000
  A.f=Sqr(n)
  Result = CallFunctionFast(FunctionWithALongName,A,b,lots,of,1000) ; Fiddle the widgit
Next

; This went wrong

P=42 ; The real meaning
     ; This comment should stay left aligned, it is a description for the block of code
For n = 1 To ; This line ends with 1000
  A.f=Sqr(n)
  Result = CallFunctionFast(FunctionWithALongName,A,b,lots,of,100; Fiddle the widgit
Next

; Not so bad, the first line was tabbed to col 21 before adjusting

P=42               ; The real meaning
                   ; This comment should stay left aligned, it is a description for the block of code
For n = 1 To 1000  ; This line ends with 1000
  A.f=Sqr(n)
  Result = CallFunctionFast(FunctionWithALongName,A,b,lots,of,1000); Fiddle the widgit
Next
Best Regards
RichardL

Posted: Thu Feb 16, 2006 4:22 pm
by gnozal
New version uploaded.
RichardL wrote:1. Lines with no code and a comment should (a) be left un-touched or (b) tabbed to the same as the first character on the last non-blank line.
The lines with a comment [';'] in the first column are untouched
RichardL wrote:2. If the comment cannot go at the wanted indent because a code line is too long then (a) leave it alone or (b) move it to the end of the code +1. At present it damages the code!
Should be fixed

Posted: Thu Feb 16, 2006 4:56 pm
by Flype
missing keyword: 'As' ( Import/EndImport )

Posted: Thu Feb 16, 2006 5:08 pm
by gnozal
Flype wrote:missing keyword: 'As' ( Import/EndImport )
Fixed

Posted: Thu Feb 16, 2006 5:11 pm
by Flype
gnozal wrote:Fixed
LOL, you are doing same as Fred, it's funny... nevermind...

Posted: Thu Feb 16, 2006 5:31 pm
by RichardL
Hi,

You wrote:

The lines with a comment [';'] in the first column are untouched

Agreed, but it should be:

The lines with a comment [';'] AT THE CURRENT INDENT are untouched :)

Just trying the other feature...

RichardL

Posted: Thu Feb 16, 2006 7:54 pm
by Flype
About PB4.0, I encountered a bug/problem with jaPBe that didn't occurs in the official IDE.

I can't compile projects that are using Import/EndImport for importing a custom .lib,
i mean for example fmod.lib, 7z.lib, or others.
NOT the ones in the /purelibraries/windows/librairies/.

This is the message i see when trying to compile (in french):

-----------------------------------------------
PureBasic1.exe - Composant introuvable

Cette application n'a pas pu démarrer car swedll32.dll est introuvable.
La réinstallation de cette application peut corriger ce problème.
-----------------------------------------------

But it works when i copy the dll to the compiler directory of purebasic.
So it seems that the string which is sent to the compiler by jaPBe to compile the project is not, at the moment, including the folder of the current project ! ? !

Look at this example:
test_swedll32.zip
Image

Posted: Fri Feb 17, 2006 5:47 am
by Shannara
This is a prime example of a dead project brought back to life by the people who love it :) Whew, thats a long sentance.

I tried out the PB4.0B3 CE and its still missing features jaPBe contains, mainly proper casing ;) So back to jaPBe I go ... whee!

Great news that this is still be developed.

Posted: Fri Feb 17, 2006 9:01 am
by netmaestro
I have problems with the japbe ide flickering badly on loading a program.

Posted: Fri Feb 17, 2006 9:05 am
by RichardL
@netmaestro

No problems at 10500 lines in current project

RichardL

Posted: Fri Feb 17, 2006 9:15 am
by Flype
@netmaestro
is the 'menu > preference > redraw window for win98' checked in your jaPBe ?

Posted: Fri Feb 17, 2006 9:52 am
by RichardL
@gnozal

I have carried out some tests on the SHIFT+CNTRL+TAB method for tidying comments. It is not yet quite perfect :(
Here are the results of some tests.

Code: Select all

  
  
  If 1  
  ; >>> This is the target layout
  ; Data import over USB
  If GoOn     
    For ImportData.w = 1 To 2
      Select ImportData.w
        Case 1
          ; Set up start and bytes for S/Pad+TIF+TSDB Section
          USB_Start_address.l = 0                         ; Start of download S/Pad
          USB_Size.l          = *StartOfLOG               ; Number of bytes to download
        Case 2
          ; Set up start and bytes for the LOG section
          USB_Start_address.l =  USB_LogClip_Start.l      ; Start of download
          USB_Size.l          =  USB_Log_Clip_Size.l      ; Number of bytes to download
      EndSelect
      
      ; *****************
      ; LOTS OF CODE HERE
      ; *****************
      
    Next
  EndIf
  
  ; >>> As entered by me 
       ; Data import over USB
  If GoOn     
    For ImportData.w = 1 To 2
      Select     ImportData.w
        Case 1
     ; Set up start and bytes for S/Pad+TIF+TSDB Section
            USB_Start_address.l = 0                     ; Start of download S/Pad
          USB_Size.l          = *StartOfLOG   ; Number of bytes to download
       Case 2
                ; Set up start and bytes for the LOG section
          USB_Start_address.l =  USB_LogClip_Start.l; Start of download
           USB_Size.l          =  USB_Log_Clip_Size.l      ; Number of bytes to download
            EndSelect
      
      ; *****************
      ; LOTS OF CODE HERE
      ; *****************
      
    Next
  EndIf  
  
  ; >>> After CNTRL+TAB with all lines highlighted. Standard jaPBe gets the 
  ; >>> indenting of lines with comments right.
  
  ; Data import over USB
  If GoOn     
    For ImportData.w = 1 To 2
      Select     ImportData.w
        Case 1
          ; Set up start and bytes for S/Pad+TIF+TSDB Section
          USB_Start_address.l = 0                     ; Start of download S/Pad ***
          USB_Size.l          = *StartOfLOG   ; Number of bytes to download
        Case 2
          ; Set up start and bytes for the LOG section
          USB_Start_address.l =  USB_LogClip_Start.l; Start of download
          USB_Size.l          =  USB_Log_Clip_Size.l      ; Number of bytes to download
      EndSelect
      
      ; *****************
      ; LOTS OF CODE HERE
      ; *****************
      
    Next
  EndIf 
  
  ; >>> After tidy up comments, highlight from line with *** to end. OOOPS!
  ; Data import over USB
  If GoOn     
    For ImportData.w = 1 To 2
      Select     ImportData.w
        Case 1
          ; Set up start and bytes for S/Pad+TIF+TSDB Section
          USB_Start_address.l = 0; Start of download S/Pad ***
          USB_Size.l          = *StartOfLOG; Number of bytes to download
        Case 2
          ; Set up start and bytes for the LOG section
          USB_Start_address.l =  USB_LogClip_Start.l; Start of download
          USB_Size.l          =  USB_Log_Clip_Size.l; Number of bytes to download
      EndSelect
      
          ; *****************
          ; LOTS OF CODE HERE
          ; *****************
      
    Next
  EndIf 
  
  ; >>> Inserted blank line and then tidy comments, *** to end
  ; Data import over USB
  If GoOn     
    For ImportData.w = 1 To 2
      Select     ImportData.w
        Case 1
          ; Set up start and bytes for S/Pad+TIF+TSDB Section
          
          USB_Start_address.l = 0                     ; Start of download S/Pad ***
          USB_Size.l          = *StartOfLOG           ; Number of bytes to download
        Case 2
                                                      ; Set up start and bytes for the LOG section
          USB_Start_address.l =  USB_LogClip_Start.l  ; Start of download
          USB_Size.l          =  USB_Log_Clip_Size.l  ; Number of bytes to download
      EndSelect
      
                                                      ; *****************
                                                      ; LOTS OF CODE HERE
                                                      ; *****************
      
    Next
  EndIf 
  
  
EndIf 
I do hope you can fix this.

Last week I used jaPBe for over 40 Hrs... beleive me, anything that can make it even better will save an old mans finger joint and eyes!

Best regards

Posted: Fri Feb 17, 2006 10:10 am
by gnozal
Flype wrote:About PB4.0, I encountered a bug/problem with jaPBe that didn't occurs in the official IDE.
I can't compile projects that are using Import/EndImport for importing a custom .lib,
i mean for example fmod.lib, 7z.lib, or others.
NOT the ones in the /purelibraries/windows/librairies/.
Hmm.
Works for me like this (using zlib static lib) :

File PureZIP_ZLIB_IMPORT.pb

Code: Select all

Import "C:\Purebasic400\Program\PureZIP_O.lib"
ZLIBCompress(*DestBuffer, *DestBufferLen, *SourceBuffer, SourceBufferLen.l) As "_compress@16"
ZLIBUnCompress(*DestBuffer, *DestBufferLen, *SourceBuffer, SourceBufferLen.l) As "_uncompress@16"
etc..
EndImport
File PureZIP_LIB.pb

Code: Select all

XIncludeFile "PureZIP_ZLIB_IMPORT.pb"
etc...
Note that I am using the full library path.

When using static import libraries (importing functions from a DLL), I think the DLL must be in the %path% or in the executable directory, eg. \compilers if you use compile/run.

Posted: Fri Feb 17, 2006 11:11 am
by gnozal
Update

- some fixes
- workaround for SHIFT+CTRL+TAB method : the comments in the 1st column and the comments with only spaces before them are untouched. All the comments on lines with source code are indented to match the comment of the first line of the block.

Code: Select all

    ; >>> As entered by me 
    ; Data import over USB 
    If GoOn      
      For ImportData.w = 1 To 2 
        Select     ImportData.w 
          Case 1 
            ; Set up start and bytes for S/Pad+TIF+TSDB Section 
            USB_Start_address.l = 0                     ; Start of download S/Pad 
            USB_Size.l          = *StartOfLOG   ; Number of bytes to download 
          Case 2 
            ; Set up start and bytes for the LOG section 
            USB_Start_address.l =  USB_LogClip_Start.l; Start of download 
            USB_Size.l          =  USB_Log_Clip_Size.l      ; Number of bytes to download 
        EndSelect 
        
        ; ***************** 
        ; LOTS OF CODE HERE 
        ; ***************** 
        
      Next 
    EndIf  
After CTRL+SHIFT+TAB

Code: Select all

    ; >>> As entered by me 
    ; Data import over USB 
    If GoOn      
      For ImportData.w = 1 To 2 
        Select     ImportData.w 
          Case 1 
            ; Set up start and bytes for S/Pad+TIF+TSDB Section 
            USB_Start_address.l = 0                     ; Start of download S/Pad 
            USB_Size.l          = *StartOfLOG           ; Number of bytes to download 
          Case 2 
            ; Set up start and bytes for the LOG section 
            USB_Start_address.l =  USB_LogClip_Start.l  ; Start of download 
            USB_Size.l          =  USB_Log_Clip_Size.l  ; Number of bytes to download 
        EndSelect 
        
        ; ***************** 
        ; LOTS OF CODE HERE 
        ; ***************** 
        
      Next 
    EndIf