Nav Manual

April 27, 2017 | Author: Mahadev Subramani | Category: N/A
Share Embed Donate


Short Description

Nav Manual...

Description

1 of 24

http://translate.googleusercontent.com/translate_f

Programming with C / AL for Microsoft Business Solutions Navision - Presentation Transcript

1. Programming Language C / LA for Microsoft Business Solutions Navision Pablo Espada Well www.esbupa.com 2.

www.programadorautonomo.net Note: Microsoft, Navision, C / AL, etc ... are trademarks of Microsoft I usually devote to training and development work and consulting. NET Also impart training on Navision Development If you want to work with you giving them training or developing a project, please contact: Web www.programadorautonomo.net www.esbupa.com Email [Email_address] [Email_address] Hope you like the presentation

Contact

3. Language C / AL - Index Data Types Variables Features Operators Judgments Allocation Decision (IF, CASE) Iteration (FOR, REPEAT, WHILE) Other Comments Tables Object Access Forms Information Source Units Dataports Common Functions SumIndexFields Flowfields Dialogues File Access Scrubber Tracking Code Code Wizard OCX BLOB Standard Format

4. Introduction

03-08-10 4:38 PM

2 of 24

http://translate.googleusercontent.com/translate_f

4GL language environment to work in Navision Specialized work on relational DB Integrated in Windows environment OCX to access data from other applications File Access

5. Data Types Key variables: Numeric Integer Numbers between 2147483647 and +2,147,483,647. BigInteger 64-bit number. L is used to indicate that is a long integer: bi: = 3983200032984209L. Decimal Numbers and +10 E63-10E63. 18 significant digits. Char A character between 0 and 255, freely convertible to whole character. Operable as an integer or a character: C: = 'A'; C: = S [2]; C: = C + 1; Option Option number between 2147483647 and +2,147,483,647, freely convertible at the option entirely. The options are the property symbolically declare the variable OptionString: OptionString = Offer, Order, Invoice, Payment

6. Data Types (II) Key variables: String Text Chains of up to 250 characters. Their characters are indexed: Name [3] Code Strings of up to 250 characters. Capitalized. The system automatically does the conversion, and removes leading and trailing spaces. His characters are indexed: CodFormasPago [3]

7. Data Types (III) Key variables: Date and Time Date Stores a date. 0D is initialized. today: = 220704D; Time Store an hour

03-08-10 4:38 PM

3 of 24

http://translate.googleusercontent.com/translate_f

0T is initialized with Time: = 123000T; DateTime Stores a UTC time. Always adapted to local time display 0T is initialized with DateTime: = December 31, 2004, 14:20:59.999.;

8. Data Types (and IV) Key variables: Boolean Boolean Logical values: TRUE or FALSE

9. Complex Types C / AL includes a set of complex types used in certain cases BLOB Used to store binary (images, files, videos, etc. ..) and is stored outside the record of the database. 2GB Max Size Record A record is associated with a record of each table. Access to fields is done by writing the name of the record, a point and the field name: EJ: Customer. "No."

10. Complex Types (II) Form It represents a form. Each form is composed of a set of controls Report Represents a Report Codeunit Container code, organized in functions File File Type. It gives access to a file system file

11. Complex Types (III) Dialog Represents a dialog box. DateFormula Represents a formula for the function CALCDATE GUID

03-08-10 4:38 PM

4 of 24

http://translate.googleusercontent.com/translate_f

Unique Identifier of the system. 16 bytes: 12345678-1234-1234-1234-1234567890AB TableFilter Lets you apply a filter to a table. Only used for Permits

12. Complex Types (IV) RecordRef Pointer to a registry. It differs from the type Record that, a priori, know the table that will write. The fields are equivalent FieldRef The key is the equivalent keyref RecordID Stores the ID of the table with Primary Key. InStream and OutStream Can read and write BLOB's Variant Undefined type required for the use of OCX Contains: record, file, action, codeunit, Automation, boolean, option, integer, decimal, char, text, code, date, time, binary, DateFormula, TransactionType, InStream and OutStream. BigText Similar to the BLOB but only for text content. MAX 2GB

13. Variables Initialization C / AL variables initialized to default values: Boolean: FALSE Numeric: 0 Strings:'' Date: 0D Time: 0T

14. Variables (II) Definition Variables in C / AL can be: Local: Its scope is the function which defines Global: Its scope is the object which defines

15. Variables (III) Example: We will create a new CodeUnit Define a set of variables (local and global)

03-08-10 4:38 PM

5 of 24

http://translate.googleusercontent.com/translate_f

Option can create a variable and display their values as follows: MESSAGE ('The value of% 1 is% 2', 'LoopNo' LoopNo)

16. Variables (IV) Arrays and matrices Property is defined Dimensions variable Dimensions = 4, 3 Brackets is the reference SaldoCtaBanco [2,2] indices have range 1 ... n Features: CLEAR (Clear all Array) Arrayl (Returns the length of the array)

17. System Variables System variables (system-defined variables) C / SIDE creates and makes available to the programmer in certain contexts Rec When you edit a record, Rec contains the record in its modified state. xRec When you edit a record, xRec contains the record before the amendment. CurrForm Variable that represents the current Form object. CurrReport Variable that represents the current Report. RequestOptionsForm Variable that represents the input dialog form object Current Report. CurrFieldNo The field number of the current field from what was called the trigger.

18. Features

19.

Definition The function is defined with a name, a number of optional parameters and optional return value. They can have local variables. The parameters can be by reference (amending its value, eg "value") or by value (the value is not altered, eg: "flag") Can be called from other objects Operators Operator C / AL Meaning . camp registration form or report control () Parentheses [] Indexing :: Scope + Sum - Subtract * Multiply

03-08-10 4:38 PM

6 of 24

http://translate.googleusercontent.com/translate_f

20.

/ Division DIV integer division MOD rest > Greater than > = Greater than or equal to = Value2) AND (Value1 0 finds the next record skipping the indicated number b) THEN a: = 0;

90. Standard Format (II) Do not use parentheses in function calls without parameters. WELL RegistrarLínea; MAL RegistrarLínea (); IF and THEN go on the same line. ELSE is on a separate line. WELL IF x = y THEN x: = x + 1 ELSE x: =-x - 1;

91. Standard Format (III) The additional clauses including an EXIT ELSE should have no part. WELL IF x y THEN EXIT (FALSE); x: = x * 2; MAL IF x y THEN EXIT(FALSE) ELSE x := x * 2; Cuando BEGIN sigue a THEN o ELSE , va en su misma línea BIEN IF x = y THEN BEGIN x := x * 2; a := a - 3; END; MAL IF x = y THEN BEGIN x := x * 2; a := a - 3; END;

92. Formateo estándar (y IV) Expresar las opciones de campos o variables de forma explícita. BIEN IF Tipo = Tipo::Oferta THEN MAL IF Tipo = 0 THEN REPEAT debe ir solo en su línea y UNTIL debe ir en una línea acompañado sólo de la condición

03-08-10 4:38 PM

24 of 24

http://translate.googleusercontent.com/translate_f

de fin. BIEN IF x < y THEN BEGIN REPEAT x := x + 1; UNTIL x = y; b := x; END; WHILE y DO van en la misma línea. BIEN WHILE z < a DO BEGIN a := a + 1; b := b - 1; END;

03-08-10 4:38 PM

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF