For/Next loop example (Basic syntax)

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather


——————————————————————————————————————————————————
Support machine translation: http://amzn.to/1Z7d5oc
——————————————————————————————————————————————————

Crystal Reports Online Help
For/Next loop example (Basic syntax)
Here is a more detailed example of Crystal Reports’ string processing capabilities. The Caesar cipher is a simple code that is traditionally credited to Julius Caesar. In this code, each letter of a word is replaced by a letter five characters further in the alphabet. For example, “”Jaws”” becomes “”Ofbx””. Notice that “”w”” is replaced by “”b””. Since there are not 5 characters after “”w”” in the alphabet, it starts again from the beginning.
Here is a formula that implements applying the Caesar cipher to the field {Customer.Customer Name} in the Xtreme database:
Rem The Caesar cipher
Dim inString ‘The input string to encrypt
inString = {Customer.Customer Name}
Dim shift
shift = 5
formula = “”””
Dim i
For i = 1 To Len(inString)
Dim inC, outC
inC = Mid(inString, i, 1)
Dim isChar, isUCaseChar
isChar = LCase(inC) In “”a”” To “”z””
isUCaseChar = isChar And (UCase (inC) = inC)
inC = LCase(inC)
If isChar Then
Dim offset
offset = (Asc(inC) + shift – Asc(“”a””)) Mod _
(Asc(“”z””) – Asc(“”a””) + 1)
outC = Chr(offset + Asc(“”a””))
If isUCaseChar Then outC = UCase(outC)
Else
outC = inC
End If
formula = formula & outC
Next iIn the above example, there is a multi-line If statement nested within the statements block of the For/Next loop. This If statement is responsible for the precise details of shifting a single character. For example, letters are treated differently from punctuation and spaces. In particular, punctuation and spaces are not encoded. Control structures can be nested within other control structures and multiple statements can be included in the statement block of a control structure.
——————————————————————————–

Previous page Next page
SAP BusinessObjects
http://www.sap.com/sapbusinessobjects/
Support services
http://service.sap.com/bosap-support/
Product Documentation on the Web
http://help.sap.com/


————————————————– ————————————————– ————————————————–
Appoġġ ta ‘traduzzjoni awtomatika: http://amzn.to/1Z7d5oc
————————————————– ————————————————– ————————————————–

Rapporti Crystal Online Għajnuna
Per / Li jmiss eżempju loop (sintassi Bażiku)
Hawn hu eżempju aktar dettaljata tal-kapaċitajiet ta ‘pproċessar spag Rapporti Crystal “”. Il cipher Caesar huwa kodiċi sempliċi li huwa tradizzjonalment kkreditat lill Julius Caesar. F’dan il-kodiċi, kull ittra ta ‘kelma hija sostitwita minn ittra ħames karattri aktar fl-alfabett. Per eżempju, “”xedaq”” isir “”Ofbx””. Avviż li “”w”” huwa mibdul b ‘ “”b””. Peress li ma jkunx hemm 5 karattri wara “”w”” fl-alfabett, jibda mill-ġdid mill-bidu.
Hawnhekk huwa formula li timplimenta applikazzjoni tal-cipher Caesar għall-qasam {Customer.Customer Isem} fid-database Xtreme:
Rem Il Caesar cipher
inString DIM “”L sekwenza input għall-kriptaġġ
inString = {Customer.Customer Isem}
bidla dIM
shift = 5
Formula = “”””
i dIM
Għal i = 1 Biex Len (inString)
Dim inc, outC
INC = ‘Nofs it (inString, i, 1)
Dim isChar, isUCaseChar
isChar = LCase (inc) Fi “”a”” u “”z””
isUCaseChar = isChar U (UCase (inc) = inc)
INC = LCase (inc)
Jekk isChar Imbagħad
dim offset
offset = (ASC (inc) + shift – ASC ( “”a””)) Mod _
(ASC ( “”z””) – ASC ( “”a””) + 1)
outC = Chr (offset + ASC ( “”a””))
Jekk isUCaseChar Imbagħad outC = UCase (outC)
Else
outC = inc
Tmiem Jekk
formula = formula & outC
Li jmiss fFil-eżempju hawn fuq, hemm multi-linja Jekk dikjarazzjoni nested fi ħdan id-dikjarazzjonijiet blokk tal-Għat / loop jmiss. Din id-dikjarazzjoni Jekk huwa responsabbli għad-dettalji preċiżi tal ċaqliq karattru wieħed. Per eżempju, l-ittri huma ttrattati b’mod differenti mill-punteġġjatura u spazji. B’mod partikolari, punteġġjatura u spazji ma jkunux kodifikati. istrutturi ta ‘kontroll tista’ tiġi nested fi ħdan strutturi oħra ta ‘kontroll u dikjarazzjonijiet multipli jistgħu jiġu inklużi fil-blokk dikjarazzjoni ta’ struttura ta ‘kontroll.
————————————————– ——————————

paġna ta ‘qabel paġna li jmiss
SAP BusinessObjects
http://www.sap.com/sapbusinessobjects/
servizzi ta ‘appoġġ
http://service.sap.com/bosap-support/
Dokumentazzjoni prodott fuq il-Web
http://help.sap.com/
 


————————————————– ————————————————– ————————————————–
Ondersteuning masjien vertaling: http://amzn.to/1Z7d5oc
————————————————– ————————————————– ————————————————–

Crystal Reports Online Hulp
Vir / Volgende lus voorbeeld (Basiese sintaksis)
Hier is ‘n meer gedetailleerde voorbeeld van string verwerking vermoëns Crystal Reports. Die keiser cipher is ‘n eenvoudige kode wat tradisioneel toegeskryf aan Julius Caesar. In hierdie kode, is elke letter van ‘n woord vervang deur ‘n brief vyf karakters verder in die alfabet. Byvoorbeeld, “”Jaws”” raak “”Ofbx””. Let daarop dat “”w”” vervang deur “”b””. Aangesien daar nie 5 karakters na “”w”” in die alfabet, dit begin weer van die begin af.
Hier is ‘n formule wat implemente die toepassing van die keiser cipher die veld {Customer.Customer Naam} in die Xtreme databasis:
Rem Die keiser cipher
Dowwe inString ‘Die insette tou te enkripteer
inString = {Customer.Customer Naam}
dowwe verskuiwing
skuif = 5
formule = “”””
dowwe i
Vir i = 1 Om Len (inString)
Dowwe INC, outC
inc = Mid (inString, ek, 1)
Dowwe isChar, isUCaseChar
isChar = LCase (incl) In “”A”” tot “”Z””
isUCaseChar = isChar en (UCase (incl) = INC)
inc = LCase (incl)
As isChar Toe
dowwe verreken
geneutraliseer = (ASC (incl) + shift – ASC ( “”a””)) Mod _
(ASC ( “”z””) – ASC ( “”a””) + 1)
outC = Chr (verreken + ASC ( “”a””))
As isUCaseChar Dan outC = UCase (outC)
anders
outC = INC
eindig As
formule = formule & outC
Volgende Iin die bogenoemde voorbeeld, daar is ‘n multi-line As stelling geneste binne die state te sluit van die Vir / Volgende lus. Dit As stelling is verantwoordelik vir die presiese besonderhede van die verskuiwing van ‘n enkele karakter. Byvoorbeeld, is briewe anders behandel van punktuasie en spasies. In die besonder, is punktuasie en spasies nie geïnkripteer. Beheerstrukture kan berus op ‘n ander beheerstrukture en verskeie state kan ingesluit word in die verklaring blok van ‘n beheerstruktuur.
————————————————– ——————————

Vorige Volgende
SAP Business
http://www.sap.com/sapbusinessobjects/
ondersteuningsdienste
http://service.sap.com/bosap-support/
Produk dokumentasie op die web
http://help.sap.com/
 


————————————————– ————————————————– ————————————————–
Mbështetje makinë përkthim: http://amzn.to/1Z7d5oc
————————————————– ————————————————– ————————————————–

Crystal Reports Online Ndihmë
Për shembull / Next lak (sintaksës Basic)
Këtu është një shembull më i detajuar i aftësive të përpunimit string Crystal Reports. Cezari shifër është një kod i thjeshtë që është kredituar tradicionalisht të Julius Caesar. Në këtë kod, çdo letër e një fjalë është zëvendësuar me një letër pesë karaktere të mëtejshme në alfabetin. Për shembull, “”Jaws”” bëhet “”Ofbx””. Vini re se “”w”” zëvendësohet me “”b””. Që nuk ka 5 karaktere pas “”w”” në alfabetin, ajo fillon përsëri nga fillimi.
Këtu është një formulë që zbaton aplikuar shifër Cezarit në fushë {Customer.Customer Emri} në bazën e të dhënave Xtreme:
Rem Cezari shifër
inString Dim ‘Vargu input të encrypt
inString = {Customer.Customer Emri}
ndryshim dim
ndryshim = 5
formula = “”””
i dim
Për i = 1 To Len (inString)
Dim INC, outC
INC = Mid (inString, i, 1)
Dim isChar, isUCaseChar
isChar = LCase (Inc) Në “”a”” deri “”z””
isUCaseChar = isChar Dhe (UCase (Inc) = Inc)
INC = LCase (Inc)
Nëse isChar Pastaj
dim kompensuar
kompensuar = (ASC (Inc) + shift – ASC ( “”a””)) Mod _
(Asc ( “”z””) – Asc ( “”a””) + 1)
outC = Chr (offset + ASC ( “”a””))
Nëse isUCaseChar Pastaj outC = UCase (outC)
tjetër
outC = inc
End If
formula = formula & outC
Next iin shembullin e mësipërm, nuk është një multi-line Nëse deklarata mbivendosur brenda deklaratave të bllokuar nga Per / lak tjetër. Kjo deklaratë Nëse është përgjegjëse për detajet e sakta të zhvendosur një karakter të vetëm. Për shembull, letrat janë trajtuar ndryshe nga shenjat e pikësimit dhe hapësira. Në veçanti, shenjat e pikësimit dhe hapësirat nuk janë të koduara. strukturat e kontrollit mund të mbivendosur brenda strukturave të tjera të kontrollit dhe deklaratat e shumta mund të përfshihen në bllokun deklaratë e një strukture të kontrollit.
————————————————– ——————————

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather