Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Beautify
Message
From
15/10/2002 14:00:05
 
 
To
15/10/2002 13:37:49
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00711392
Message ID:
00711402
Views:
11
Actually I thought of that so I cut out 3 procedures, 1 where the indentations are correct, 1 with a define window statement and then another procedure. I placed these in a file ran the beautifier with the same results.
By the way the file beautifies correctly in FPW 2.6.
Here are the 3 procedures. The indentions don't show up correctly in the browser so cut and paste them to your own file and see if you get the same results.

PROCEDURE bld_msg
PARAMETERS m.pcpmsg,m.pcomit_field
PRIVATE m.lncount, m.lnfields, m.lnfsize, m.lctxt

m.lnfields = FCOUNT()
FOR m.lncount = 1 TO m.lnfields
m.lctxt='' && Initialize to blank
DO CASE
CASE !EMPTY(m.pcomit_field) AND;
(ALLTRIM(FIELD(m.lncount)) == ALLTRIM(m.pcomit_field))
m.pcpmsg = m.pcpmsg+CHR(4)
CASE TYPE(FIELD(m.lncount)) = 'C' && character string
&& --> Remove Tabs (CHR(9)), Line Feeds (CHR(10)), Carriage Returns
&& --> (CHR(13)), Nulls (CHR(0)) and Special NON-ALLOWED Characters
&& --> (*, ~, and >) from field that may alter message parsing results
&& --> and building of files for state jurisdictions.
m.lctxt = ALLTRIM(EVAL(FIELD(m.lncount)))
m.lctxt = STRTRAN(m.lctxt,CHR(0),SPACE(1))
m.lctxt = STRTRAN(m.lctxt,CHR(9),SPACE(1))
m.lctxt = STRTRAN(m.lctxt,CHR(10),SPACE(1))
m.lctxt = STRTRAN(m.lctxt,CHR(13),SPACE(1))
m.lctxt = STRTRAN(m.lctxt,'*',SPACE(1))
m.lctxt = STRTRAN(m.lctxt,'~',SPACE(1))
m.lctxt = STRTRAN(m.lctxt,'>',SPACE(1))
m.pcpmsg = m.pcpmsg+ALLTRIM(m.lctxt)+CHR(4)
CASE TYPE(FIELD(m.lncount)) = 'M' && memo field
&& --> Remove Tabs (CHR(9)), Line Feeds (CHR(10)), Carriage Returns
&& --> (CHR(13)), Nulls (CHR(0)) and Special NON-ALLOWED Characters
&& --> (*, ~, and >) from field that may alter message parsing results
&& --> and building of files for state jurisdictions.
m.lctxt = ALLTRIM(EVAL(FIELD(m.lncount)))
m.lctxt = STRTRAN(m.lctxt,CHR(0),SPACE(1))
m.lctxt = STRTRAN(m.lctxt,CHR(9),SPACE(1))
m.lctxt = STRTRAN(m.lctxt,CHR(10),SPACE(1))
m.lctxt = STRTRAN(m.lctxt,CHR(13),SPACE(1))
m.lctxt = STRTRAN(m.lctxt,'*',SPACE(1))
m.lctxt = STRTRAN(m.lctxt,'~',SPACE(1))
m.lctxt = STRTRAN(m.lctxt,'>',SPACE(1))
m.pcpmsg = m.pcpmsg+ALLTRIM(m.lctxt)+CHR(4)
CASE TYPE(FIELD(m.lncount)) = 'N' && numeric field
&& --> If the number matches its value as an integer, then
&& --> just convert the number to a string
IF INT(EVAL(FIELD(m.lncount))) = EVAL(FIELD(m.lncount))
m.pcpmsg = m.pcpmsg+ALLTRIM(STR(EVAL(FIELD(m.lncount))))+;
CHR(4)
&& --> otherwise, we assume that the number has two places
&& --> to the right of the decimal point. The STR() function
&& --> makes this work.
ELSE
m.lnfsize = FSIZE(FIELD(m.lncount))
m.pcpmsg = m.pcpmsg+ALLTRIM(STR(EVAL(FIELD(m.lncount)),+;
m.lnfsize,2))+CHR(4)
ENDIF
CASE TYPE(FIELD(m.lncount)) = 'D' && date field
m.pcpmsg = m.pcpmsg+DTOC(EVAL(FIELD(m.lncount)))+CHR(4)
ENDCASE
ENDFOR

RETURN m.pcpmsg
***********************************************************************
PROCEDURE rcvd_err
PARAMETERS pcerr
&& --> error occurred receiving from advantis display window ***
&& --> to show on SAC3 host ***
DEFINE WINDOW rcvd_err FROM 5,10 TO 20,65 TITLE ;
'Advantis Receive Command Error' SYSTEM CLOSE FLOAT
MOVE WINDOW rcvd_err CENTER
ACTIVATE WINDOW rcvd_err
@1,2 SAY 'An ERROR Occurred while performing function to '
@2.5,2 SAY 'Receive files from Advantis.'
@4,2 SAY 'ERROR #: '+ALLT(STR(pcerr))
@WROW()-2,2 SAY "'Ctrl+F4' to close or Double Click top left corner."
RETURN
***********************************************************************
PROCEDURE 37hmsg
PARAMETER m.pcpayor_id

IF !EMPTY(payrstat.msgout)
m.lcmsg_out = "37:100000001"+CHR(4)+"MSGCOUNT"+CHR(4)+PADL(ALLT(STR(payrstat.msglncnt)),5,'0')+CHR(4)
m.lcmsg_out = ALLT(m.lcmsg_out)+CHR(13)
m.lcmsgname=msg_out(m.pcpayor_id,m.lcmsg_out, .T.,'P')
REPLACE payrstat.msgout WITH " "
REPLACE payrstat.msglncnt WITH 0

IF m.hndmsgout != -1
=FCLOSE(m.hndmsgout)
m.hndmsgout = -1
ENDIF
ENDIF

RETURN


>How large is your file? There is a limit to the size of file beautify can handle and it stops when it reaches the limit. I cannot remember the limit though and I have hit it myself at times.
>
>Tracy
>
>>I have a library file that I have run through the VFP 7.0 beautifier with strange results. About half way through the file the indentions are off. My first thought was there is a missing endif or enddo. After further investigating it starts after a procedure with a DEFINE WINDOW statement. The procedures after this have the procedure line indented. I know that it is this line beacuse I commented out the line and the indentions were correct. Because there are several procedures with a DEFINE WINDOW statement in them I cannot just move the offending procedure to the end of the file.
>>
>>Does anyone have a clue as to what is causing this?
>>
>>Thanks
>>Mike
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform