You are here: PSPad forum > Developer forum - new builds > PSPad unicode 5.0.7 (721) English

PSPad unicode 5.0.7 (721) English

Goto Page: Previous1 2 3 Next

#11 Re: PSPad unicode 5.0.7 (721) English

Posted by: pspad | Date: 2021-12-23 11:14 | IP: IP Logged

I though it too, that there must be a point, but in samples I have there is many cases where there is no END- not point on the end.

Examples:

There is IF without END-IF, MOVE without END-MOVE, but there are dots. BUT. The dot ends MOVE and IF together.
IF WS-XXX-YYY = 1
MOVE 'SSR' TO FXXXX-ID.
MOVE '/' TO FXXXX-S1.
MOVE WS-CCCC-SSS TO FXXXX-IN.

Second example - there is IF - END-IF, but few MOVE without dots
IF NOT CHECK-CODE
MOVE "ge05cdar not installed!!" TO MSG-WXX
MOVE SPACES TO MSG-WXX MSG-WYY
MOVE "Attention" TO MSG-TXX
PERFORM MSG-WXX
END-IF

Both cases withh break code folding

Options: Reply | Quote | Up ^


#12 Re: PSPad unicode 5.0.7 (721) English

Posted by: Gabriel_ACE | Date: 2021-12-27 12:06 | IP: IP Logged

I understand you.

the rule is simple

the "." has priority over END-XXXX

many programmers use points just to save typing

if you try to compile the following example the compiler will cancel

IF variable1 = 100
move "HI!!!" TO WS-VARIBLE2 .
END-IF

the compiler will detect an "END-IF" that is not associated with any "IF" and considers it an error

but you can do this too:

IF variable1 = 100
move "HI!!!" TO WS-VARIBLE2
END-IF.

you can use at the same time

what I don't understand is the following:

in pspad when the mouse passes over an IF it always detects and remarks the END-IF correctly

Can't you use the same logic for this topic that I'm asking you?

taking into account what I'm telling you ...
Is it possible to make the change on the pspad?

Options: Reply | Quote | Up ^


#13 Re: PSPad unicode 5.0.7 (721) English

Posted by: pspad | Date: 2021-12-27 12:15 | IP: IP Logged

What about the forst case:

IF F01 PERFORM HELP SET SCS-RIPETI TO TRUE.

There is IF and PERFORM without END-IF or END-PERFORM with only one DOT.

Edited 1 time(s). Last edit at 2021-12-27 13:17 by pspad.

Options: Reply | Quote | Up ^


#14 Re: PSPad unicode 5.0.7 (721) English

Posted by: pspad | Date: 2021-12-27 14:25 | IP: IP Logged

I will make some first version. Check it and we can continue to modify it.

Options: Reply | Quote | Up ^


#15 Re: PSPad unicode 5.0.7 (721) English

Posted by: Gabriel_ACE | Date: 2021-12-27 14:33 | IP: IP Logged

pspad:
What about the forst case:

IF F01 PERFORM HELP SET SCS-RIPETI TO TRUE.

There is IF and PERFORM without END-IF or END-PERFORM with only one DOT.

I am going to transcribe it in a clearer way so that it is understood

*----------------------------------------------
IF F01 ---------> is a boolean variable (true or false)
PERFORM HELP
SET SCS-RIPETI TO TRUE.

STOP RUN

*-----------------------------------------------
HELP.
*----
DO STUF

.
HELP-EXIT. EXIT.
*------------------------------------------------

F01 ----> boolean variable, if is true
then computer go perform HELP, do stuff, then RETURN and SET SCS-RIPETI TO TRUE

another way to write that sentences is:

*----------------------------------------------
IF F01
PERFORM HELP
SET SCS-RIPETI TO TRUE
END-IF

STOP RUN

*-----------------------------------------------
HELP.
*----
DO STUF

.
HELP-EXIT. EXIT.
*------------------------------------------------

If you need more help or explanations, I am here for you

Options: Reply | Quote | Up ^


#16 Re: PSPad unicode 5.0.7 (721) English

Posted by: pspad | Date: 2021-12-27 14:38 | IP: IP Logged

Hello

You didn't understand me

There was IF and PERFORM on the one line and line ends with DOT.
It means DOT ends both commands and serves as substitution for missing END-PERFORM and END_IF. Right?

Options: Reply | Quote | Up ^


#17 Re: PSPad unicode 5.0.7 (721) English

Posted by: Gabriel_ACE | Date: 2021-12-27 15:43 | IP: IP Logged

it is not exactly like this:

all cobol instructions can be closed with a period

for example:

MOVE variable1 TO variable2

or

MOVE variable1 TO variable2.

is the same.

in the case of "perform" it has several nuances

I'm going to write you all

PERFORM 1000-start ----> computer jump to 1000-start do stuf and then return

PERFORM 1000-start ----> the same than before
thru 1000-start _|

PERFORM 1000-start ---> the same than before but loop until end of file
until EOF

PERFORM 1000-start ----> the same than before
thru 1000-start _|
UNTIL EOF

USING "." is the same

PERFORM 1000-start. ----> compute jump to 1000-start do stuf and then return

PERFORM 1000-start ----> the same than before
thru 1000-start. _|

PERFORM 1000-start. ---> the same than before but loop until end of file
until EOF

PERFORM 1000-start ----> the same than before
thru 1000-start. _|
UNTIL EOF

USING "END-PERFORM" is a special case

The "perform" is used to jump to another part of the code, do what is there and then return

but if you only want to use it as a for loop, that is where the END-PERFORM is used

PERFORM varying I from 1 by 1
until I > 10

DISPLAY I

END-PERFORM

OR

PERFORM varying I from 1 by 1
until I > 10

DISPLAY I . ----> see the dot... close the PERFORM

*-------------------------------------------
1000-start.
*----------

DO STUFF

.
1000-start-exit. Exit
*-------------------------------------------

Is this explanation useful? or did I understand wrong?

Options: Reply | Quote | Up ^


#18 Re: PSPad unicode 5.0.7 (721) English

Posted by: pspad | Date: 2021-12-27 15:47 | IP: IP Logged

hello

yes, it's usefull, but I am not able to count with all possible cases in code folding especially when cases can be nested.

Try build 723, but I am afraid it's near all what I can do.

Options: Reply | Quote | Up ^


#19 Re: PSPad unicode 5.0.7 (721) English

Posted by: Gabriel_ACE | Date: 2021-12-27 17:53 | IP: IP Logged

pspad:
hello

yes, it's usefull, but I am not able to count with all possible cases in code folding especially when cases can be nested.

Try build 723, but I am afraid it's near all what I can do.

I already tried the IF, evaluate
and the perform y seem to work correctly

even ending the syntax with period

Excellent job! grinning smiley

Options: Reply | Quote | Up ^


#20 Re: PSPad unicode 5.0.7 (721) English

Posted by: pspad | Date: 2021-12-27 18:01 | IP: IP Logged

There can be situation what will fold incorrectly, but till the end of section only.

Options: Reply | Quote | Up ^


Goto Page: Previous1 2 3 Next





Editor PSPad - freeware editor, © 2001 - 2022 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR