Page 1 of 1

Code Folding Request for Pronto

Posted: Fri Jun 10, 2011 12:02 am
by bsuggo
Hi
Pronto is a 4gl loosely based on COBOL.(pronto.com.au) used in their ERP product. Editor looks good even without code folding.(I have paid for it, waiting for key)
small explanation: the end conditions can be either endcommand or end-command. If you can do both, terrific. If not then use the hyphenated version

Code: Select all

    Extension: .spl
 Line Comment: //
Block Comment: none 
        Begin: if 
          End: endif 
        Begin: for 
          End: endfor / end-for 
        Begin: procedure 
          End: endprocedure / end-procedure 
        Begin: extract
          End: endextract / end-extract
        Begin: repeat 
          End: endrepeat / end-repeat
        Begin: while 
          End: endwhile / end-while 
        Begin: switch 
           End: endswitch / end-switch 
Sample Code:

Code: Select all

procedure this-is-a-test
      if test = true
          extract data-table
                on index 'xyz'
	key 'ddd'
           detail
	        repeat
		do this-procedure-initially
	        until data = 'eee'
		do this-proc-when-true
	        endrepeat
	    endextract
		while x = y
			for i = 1 to 20
				do something
			endfor
		endwhile
	endif

	switch on 'abc'
	                case 'a'
			do a-proc
		case 'b'
			set ws-item = 678.98
		case 'c'
			do c-proc
	else
		panic
	endswitch
		
	endif
  endprocedure
preview seems to ignore layout!
hope it makes sense when it arrives.
Thanks
BGS

Posted: Fri Jun 10, 2011 1:14 am
by jussij
Find below a link to a new xFolder.dll that implements this folding:

http://www.zeusedit.com/z300/xFolder.zip

Cheers Jussi

code folding for Pronto

Posted: Fri Jun 10, 2011 4:44 am
by bsuggo
Hi Jussi
Thanks for the great response
Everything works really well.
I forgot some cases, we also have

begin: screen
end: endscreen / end-screen
begin: confirm
end: endconfirm / end-confirm
begin: menu
end: endmenu / end-menu

sample code
screen customer-budgets
window @1,1 to @32,COL_EOD + 1//113
form-entry
colour COLOUR_BACKGROUND
title ws-title
/// do some stuff
confirm auto
confirmed
//
open tmp-actuals truncate temporary
do get-actuals
parameter ws-cust-code
do roll-up-actuals
set ws-tab-selected = TAB_TOTAL
do display-sub-super-budgets
do display-super-group-budgets
not-confirmed
exit
endconfirm
endscreen

menu select-account-or-group
parameter lp-mode pic x
window @1,1 to @4,20
title "Select Help Type"
detail
option "Rebate Group" @3,5
save hyne-rebate-master
do show-current-groups parameters "G", "Rebate Group"
restore hyne-rebate-master
exit
end-menu

Thanks
Bruce S

Posted: Fri Jun 10, 2011 5:23 am
by jussij
Find below a link to a new xFolder.dll that implements these new fold points:

http://www.zeusedit.com/z300/xFolder.zip

Cheers Jussi

Many thanks

Posted: Mon Jun 13, 2011 11:02 pm
by bsuggo
Thanks Jussi
both for the prompt service and the solution.
All is working beautifully.
Bruce S.