Source / code snippets | | | | - Page 1 - |
|  |
Source watts on the 15.07.2007 from the MMJ-Quellcodesammlung (Dietmar horn) in The Babyklappe on XProfan.Com stored:
Source-Formatierer
##########################################################################
PRF-structure, a Profan OpenSource Project(theFirst?),started april 2004
copyright (C) 2004 by DS/iF (!ReGeXiT) on (iF@mxii.com)
__________________________________________________________________________
Diese program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public licensed
as published by the Free software Foundation; either Version 1.1
of the licensed, or (at your option) any later . Version
Diese program is distributed in the hope that it wants be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. sea the
GNU General Public licensed for more details.
You should have received a copy of the GNU General Public licensed
along with this program; if hardship, write to the Free software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-
1307, USA.
__________________________________________________________________________
Source changed by: [20040707] [IF] [if@mxii.com] <- added xpse syntax
Source changed by: [DATE] [NICK/NAME] [EML]
Source changed by: [DATE] [NICK/NAME] [EML]
Source changed by: [DATE] [NICK/NAME] [EML]
Source changed by: [DATE] [NICK/NAME] [EML]
##########################################################################
Decimals 0
Def Inv(1) If(@%(1),0,1)
Declare s$,Cx%,Ch$,Kl%,Ln%,Insa%,pre$,Infle$,Maxinsa%,Maxln%,Frl%,Lnp%
Proc _end
End
Endproc
Proc Printfree
Ifnot Frl%
Print #2,
Frl%=1
Add Lnp%,1
Endif
Endproc
Proc Printit
Parameters s$
Print #2,s$
Add Lnp%,1
Frl%=0
Endproc
Proc Printm
Parameters s$,n%
Print s$,n%
Sleep 1000
Close #1
Close #2
Shell notepad _out_.txt
Waitkey
End
Endproc
Windowtitle structure V1.0 - Profan
Windowstyle 24
Window 100,100 - 640,480
Frl%=0
Lnp%=0
Infle$=Loadfile$(Profan-Program:,Profan-Source (*.prf)|*.prf|any Files (*.*)|*.*)
If Len(Infle$)
Assign #1,Infle$
Reset #1
Assign #2,_out_.txt
Rewrite #2
Locate 1,1
Print File:,Infle$
Kl%=0
Ln%=0
Insa%=0
Maxinsa%=0
Maxln%=0
Whilenot Eof(#1)
Input #1,s$
s$=Translate$(s$,Chr$(7),)
s$=Translate$(s$,Chr$(9),)
Add Ln%,1
While Or(Equ$(Chr$(9),Mid$(s$,1,1)),Equ$(Chr$(32),Mid$(s$,1,1)))
s$=Del$(s$,1,1)
Wend
Casenot Len(Trim $(s$)) : Continue
Ifnot Mod(Lnp%,25)
Locate 2,1
Print Lines:,Lnp%
Print maximum deep:,Maxinsa%+1
Endif
Case Kl% : Printm string parse error in line:,Lnp%
Ifnot Equ$(Mid$(s$,1,3),P +Chr$(34))
Cx%=0
While Lt(Cx%,Len(s$)+1)
Add Cx%,1
Ch$=Mid$(s$,Cx%,1)
If Equ$(,Ch$)
Ifnot Kl%
s$=Mid$(s$,1,Cx%-1)
Endif
Endif
Case Equ$(Ch$,Chr$(34)) : Kl%=Inv(Kl%)
Ifnot Kl%
Endif
Wend
Case Equ$(WHILE ,Upper $(Mid$(s$,1,6))) : Printfree
Case Equ$(REPEAT,Upper $(Mid$(s$,1,6))) : Printfree
Case Equ$(WEND,Upper $(s$)) : Printfree
Case Equ$(UNTIL,Mid$(Upper $(s$),1,5)) : Printfree
Case Equ$(ENDWHILE,Upper $(s$)) : Printfree
Case Equ$(WHILENOT ,Upper $(Mid$(s$,1,9))) : Printfree
Case Equ$(WHILELOOP ,Upper $(Mid$(s$,1,10))) : Printfree
Case Equ$(IF ,Upper $(Mid$(s$,1,3))) : Printfree
Case Equ$(IFNOT ,Upper $(Mid$(s$,1,6))) : Printfree
Case Equ$(PROC ,Upper $(Mid$(s$,1,5))) : Printfree
Case Equ$(FUNCTION ,Upper $(Mid$(s$,1,9))) : Printfree
Case Equ$(PROCEDURE ,Upper $(Mid$(s$,1,10))) : Printfree
Case Equ$(ENDPROC,Upper $(s$)) : Sub Insa%,1
Case Equ$(ENDIF,Upper $(s$)) : Sub Insa%,1
Case Equ$(ENDIF,Upper $(s$)) : Printfree
If Equ$(ELSEIF ,Upper $(Mid$(s$,1,7)))
Sub Insa%,1
Printfree
Elseif Equ$(ELSE,Upper $(Mid$(s$,1,4)))
Printfree
Sub Insa%,1
Endif
Case Equ$(UNTIL,Upper $(Mid$(s$,1,5))) : Sub Insa%,1
Case Equ$(WEND,Upper $(Mid$(s$,1,4))) : Sub Insa%,1
Case Equ$(ENDWHILE,Upper $(Mid$(s$,1,8))) : Sub Insa%,1
Case Lt(Insa%,0) : Printm Insafailure in line:,Lnp%
If Gt(Insa%,Maxinsa%)
Maxinsa%=Insa%
Maxln%=Lnp%
Endif
pre$=Mkstr$(Chr$(9),Insa%)
If Len(Trim $(s$))
Printit Add$(pre$,s$)
Endif
Case Equ$(REPEAT,Upper $(Mid$(s$,1,6))) : Add Insa%,1
Case Equ$(WHILE ,Upper $(Mid$(s$,1,6))) : Add Insa%,1
Case Equ$(WHILENOT ,Upper $(Mid$(s$,1,9))) : Add Insa%,1
Case Equ$(WHILELOOP ,Upper $(Mid$(s$,1,10))) : Add Insa%,1
If Equ$(ELSEIF ,Upper $(Mid$(s$,1,7)))
Add Insa%,1
Printfree
Elseif Equ$(ELSE,Upper $(Mid$(s$,1,4)))
Printfree
Add Insa%,1
Endif
Case Equ$(PROC ,Upper $(Mid$(s$,1,5))) : Add Insa%,1
Case Equ$(PROCEDURE ,Upper $(Mid$(s$,1,10))) : Add Insa%,1
Case Equ$(FUNCTION ,Upper $(Mid$(s$,1,09))) : Add Insa%,1
Case Equ$(IF ,Upper $(Mid$(s$,1,3))) : Add Insa%,1
Case Equ$(IF ,Upper $(Mid$(s$,1,3))) : Printfree
Case Equ$(IFNOT ,Upper $(Mid$(s$,1,6))) : Add Insa%,1
Case Equ$(IFNOT ,Upper $(Mid$(s$,1,6))) : Printfree
Case Equ$(WHILENOT ,Upper $(Mid$(s$,1,9))) : Printfree
Case Equ$(WHILELOOP ,Upper $(Mid$(s$,1,10))) : Printfree
Case Equ$(REPEAT,Upper $(Mid$(s$,1,6))) : Printfree
Case Equ$(WHILE ,Upper $(Mid$(s$,1,6))) : Printfree
Case Equ$(ENDIF,Upper $(s$)) : Printfree
Case Equ$(ENDPROC,Upper $(s$)) : Printfree
Case Equ$(WEND,Upper $(s$)) : Printfree
Case Equ$(UNTIL,Upper $(Mid$(s$,1,5))) : Printfree
Case Equ$(ENDWHILE,Upper $(s$)) : Printfree
Case Lt(Insa%,0) : Printm Insafailure in line:,Lnp%
Endif
Wend
Close #1
Close #2
Locate 2,1
Print Lines:,Lnp%
Print maximum deep:,Maxinsa%+1,in row,Maxln%
Sleep 2000
Shell notepad _out_.txt
Endif
End
|
| | | | |
| | | | | - Page 1 - |
|  | Sometime I had the well too time as "Online-Service" -
The Nity format ohnehin any Source and there could the indeed as separates feature abrufbar his. ^^ |
| | | | |
| |  Christof Neuß | Hello Andreas,
class!!! THANK YOU!
sees already very well from. certainly can You me yet explain, Why sometimes the ENDPROC not recognized becomes? Z.B. here:
PROC KriterienBearbeiten'---------------------------------------------------------------------------> Dialoganfang
DECLARE Dialogende%
DECLARE FALISTVIEW1&
DECLARE Button1&
DECLARE Button2&
DECLARE Ueber$[]
VAR AenderungsSpalten$="011111"
VAR FALISTVIEWDLL&=USEDLL("LISTVIEW.DLL")
VAR DLG&=CREATE("DIALOG",%HWND,"Selektionskriterien erfassen/bearbeiten",180,200,800,270)
VAR UeberTrans1$=Space$(35)
VAR UeberTrans2$=Space$(35)
SetODBCSpalten "TZZZZZ"
Ueber$[0]="Kundengruppe"
Ueber$[1]="Anlagevolumen"
Ueber$[2]="Aktivvolumen"
Ueber$[3]="Gehalt"
Ueber$[4]="Klasse/Segment VON"
Ueber$[5]="Klasse/Segment BIS"
USEFONT "MS Sans Serif",13,0,0,0,0
SETDIALOGFONT 1
FALISTVIEW1& = CREATELISTVIEW(DLG&,%HINSTANCE,0,$FFFFFF,-1,$31)
LVSQL("Select * from T_Bank_Kriterien",FALISTVIEW1&)
EnableEdits(FALISTVIEW1&,7)
SelectColumnEdits(FALISTVIEW1&,addr(AenderungsSpalten$))
WhileLoop 0,5
GetColumnName(FALISTVIEW1&,addr(UeberTrans1$),&LOOP)
UeberTrans2$=Ueber$[&LOOP]
SetColumnName(FALISTVIEW1&,addr(UeberTrans2$),&LOOP)
Ueber$[&LOOP]=Trim $(UeberTrans1$)
if &LOOP>0
Bugfix 02.01(FALISTVIEW1&,&LOOP,1)
endif
EndWhile
SHOWLISTVIEW(FALISTVIEW1&,0020,0010,0740,0150)
BUTTON1& =@CREATE("BUTTON",DLG&,"Speichern",0600,0180,0070,0030)
BUTTON2& =@CREATE("BUTTON",DLG&,"Abbruch" ,0700,0180,0070,0030)
InitMessages(DLG&)
SETFOCUS(DLG&)
DIALOGENDE%=0
WHILENOT DIALOGENDE%
WAITINPUT
If %KEY=2
DIALOGENDE%= 1
ELSEIF CLICKED(BUTTON1&)'BUTTON Save
WhileLoop 0,5
GetColumnName(FALISTVIEW1&,addr(UeberTrans1$),&LOOP)
UeberTrans2$=Ueber$[&LOOP]
SetColumnName(FALISTVIEW1&,addr(UeberTrans2$),&LOOP)
Ueber$[&LOOP]=Trim $(UeberTrans1$)
EndWhile
LV2ODBC("",0,"T_Bank_Kriterien",1,0,FALISTVIEW1&)
DIALOGENDE%=1
ElseIF CLICKED(BUTTON2&)'BUTTON discontinue
DIALOGENDE%=1
ENDIF
ENDWHILE
DESTROYWINDOW(DLG&)
CloseMessages(DLG&)
FREEDLL FALISTVIEWDLL&
ENDPROC
PROC FilialenBearbeiten
DECLARE Dialogende%
|
| | | | |
| |  Christof Neuß | Haha.... now be I on it reingefallen. @iF: Tja, whom Formatierer here had I naturally too benefit can. working well. is only EVTL. here and there something umständlich.
in the angegenen code becomes with "EndProc" not again ausgerückt  |
| | | | |
| |  Christof Neuß | Hello Andreas,
I hab's found. it's located on the row:
SelectColumnEdits(FALISTVIEW1&,addr(AenderungsSpalten$))
"Select" becomes as Beginn of/ one structure interprets, though not as word on my own standing. what can I because there make?
THANK YOU! |
| | | | |
| |  Andreas Miethe
 | Hello Christof,
The question is sooner I there can make  |
| | | Gruss Andreas ________ ________ ________ ________ _ Profan 3.3 - XProfanX2 Win 95,98,ME,2000,XP,Vista - Win 7 32 / 64 Bit ASUS X93S - Intel Core I7-NVIDIA GForce 540M 8GB Arbeitsspeicher Homepage : [...]  | 11/01/11 ▲ |
| |
| |  Andreas Miethe
 | OK, Done !
Download directly over the editor : Menu aide -> editor update . |
| | | Gruss Andreas ________ ________ ________ ________ _ Profan 3.3 - XProfanX2 Win 95,98,ME,2000,XP,Vista - Win 7 32 / 64 Bit ASUS X93S - Intel Core I7-NVIDIA GForce 540M 8GB Arbeitsspeicher Homepage : [...]  | 11/01/11 ▲ |
| |
| |  Christof Neuß | Hi Andreas,
the would Yes SUPER, but the gedownloadete ZIP-File contains again The same ZIP-File and whom middle-aged editor. 
Perhaps only once more correctly. pack?
would me large joy make  |
| | | | |
| |  Andreas Miethe
 | UPS sorry.
new Version is uploaded. |
| | | Gruss Andreas ________ ________ ________ ________ _ Profan 3.3 - XProfanX2 Win 95,98,ME,2000,XP,Vista - Win 7 32 / 64 Bit ASUS X93S - Intel Core I7-NVIDIA GForce 540M 8GB Arbeitsspeicher Homepage : [...]  | 11/01/11 ▲ |
| |
| | | | - Page 2 - |
| |  | @Christof: Jupp, umständlich -
thatswhy my I Yes as "extra" service -
could I vlt. here at View source-Merker ( [...] ) as feature reinprogrammieren. |
| | | | |
| |  Christof Neuß | @Andreas: THANK YOU! functions correct  |
| | | | |
| |  Christof Neuß | @iF: Yes, the would sure 'ne good place, circa so what einzubinden. How plenty View source can because here take on? is the somehow terminable? |
| | | | |
| |  | termless -
anyway there here no border How "Du must only so and so plenty Upload and Files can only so and so big sein" etc. -
You can on XProfan.com means so plenty Upload and post How You want or. so plenty as Browser-(programs) and Webserver verkraften. ^^
technical border Gibts naturally always -
there helps but z.B. simply try. |
| | | | |
|
Zum QuelltextThemeninformationenthis Topic has 4 subscriber: |