jaPBe 3.13.4 [IDE for PB 4 and PB 5]

All PureFORM, JaPBe, Libs and useful code maintained by gnozal

Moderator: gnozal

THCM
Enthusiast
Enthusiast
Posts: 276
Joined: Fri Apr 25, 2003 5:06 pm
Location: Gummersbach - Germany
Contact:

Post by THCM »

Nice to see a new maintainer for Japbe! I think I'll switch back to Japbe! Thanx!
The Human Code Machine / Masters' Design Group
RichardL
Enthusiast
Enthusiast
Posts: 532
Joined: Sat Sep 11, 2004 11:54 am
Location: UK

Post 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
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post 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
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Post by Flype »

missing keyword: 'As' ( Import/EndImport )
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Flype wrote:missing keyword: 'As' ( Import/EndImport )
Fixed
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Post by Flype »

gnozal wrote:Fixed
LOL, you are doing same as Fred, it's funny... nevermind...
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
RichardL
Enthusiast
Enthusiast
Posts: 532
Joined: Sat Sep 11, 2004 11:54 am
Location: UK

Post 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
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Post 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
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
Shannara
Addict
Addict
Posts: 1808
Joined: Thu Oct 30, 2003 11:19 pm
Location: Emerald Cove, Unformed

Post 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.
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8425
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

I have problems with the japbe ide flickering badly on loading a program.
Last edited by netmaestro on Tue Feb 21, 2006 12:49 pm, edited 2 times in total.
RichardL
Enthusiast
Enthusiast
Posts: 532
Joined: Sat Sep 11, 2004 11:54 am
Location: UK

Post by RichardL »

@netmaestro

No problems at 10500 lines in current project

RichardL
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Post by Flype »

@netmaestro
is the 'menu > preference > redraw window for win98' checked in your jaPBe ?
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
RichardL
Enthusiast
Enthusiast
Posts: 532
Joined: Sat Sep 11, 2004 11:54 am
Location: UK

Post 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
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post 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.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post 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  
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Post Reply