Results 1 to 5 of 5

Thread: Tips for PowerScript Painter

  1. #1
    Join Date
    May 2009
    Posts
    201

    Tips for PowerScript Painter

    As you know last year, to open the PowerScript painter you must either click on the Script button in the toolbar or click script with the right mouse button on an object. You will notice that the painter has its own toolbar to the main editing functions. Functions Delete, Cut, Copy and Paste all work as a plain text editor. In addition, it offers functions for pasting into the script variable names, objects, and even structures of standard code.

    Before continuing, I suggest you familiarize yourself with the help functions that are available on the subject of PowerScript. First, there is the Help menu that takes you to the encoding techniques. To do do: Help -> Help contents -> Contents -> PowerScript language. And if you have the CD References in Books Online you have access to all documentation on language in the PowerScript Reference which you can read through the DynaText reader.

  2. #2
    Join Date
    May 2009
    Posts
    201

    Re: Tips for PowerScript Painter

    Soon we will begin studying the sample application that comes with PowerBuilder software. This application is very complete and very well designed and worth exploring. It shows a system for order entry and billing for a company that sells nuts. If you have the software installed on your C: you will find the application ABNC (Anchor Bay Nut Company) as follows:

    • C: \ PWRS \ Pb5i32 \ Ex \ Abnc \ Abnc_ord.pbl

  3. #3
    Join Date
    May 2009
    Posts
    201

    Re: Tips for PowerScript Painter

    THE PowerScript: BASIC TECHNIQUES

    Lines of Code : PS The language is not very rigid spaces, indentations, etc.. did not matter to the compiler. However, they are the teacher and you must respect the basic techniques for code readability. In general we write a command line, for readability it is sometimes better to put the order on 2 lines using the continuation character "&". The following line is correct:

    • MessageBox ("SQL Error", String (SQLCA.SQLDBcode) + "" + SQLCA.SQLErrText)


    But it would be better to read it in 2 lines in a script:
    • MessageBox ("SQL Error", String (SQLCA.SQLDBcode) &
    • + "" + SQLCA.SQLErrText)


    Otherwise you could write 2 commands on one line separated by one, but this is not a recommended practice! The use of uppercase or lowercase does not matter, except for readability.

    Comments : It recommends the use of comments in scripts wherever an explanation is required. Comments can be on one line using / / as:

    Code:
    / / This is a comment 
    sle_nom.Text = "Michel" / / The comment follows a command 
    It may indicate a block comment with / * and * at the beginning / end: 
    / * This is a block 
    comments on 
    several lines * /

  4. #4
    Join Date
    May 2009
    Posts
    201

    Re: Tips for PowerScript Painter

    Variable names

    • The name must start with a letter
    • Maximum of 40 characters
    • Should not contain spaces, may contain signs - _% $ # (The hyphen - although legal is strongly discouraged because it is confusing with the transaction less, rather use the underscore as: last_name or uppercase as: LastName)
    • Do not be a reserved word (part code)


    Data Types
    1. Blob : Binary large object. Used to store unbounded year Amount of data (for example, generic binary, image, or large text, Such as a word-processing document).
    2. Boolean : Contains TRUE or FALSE.
    3. Char gold character : A single ASCII character.
    4. Date : The date, Including The Full year (1000 to 3000), The Number of the Month (01 to 12), and the Day (01 to 31).
    5. DateTime : The date and time in a single data type, Used only for reading and writing from and DateTime values ​​to a database. To convert DateTime values ​​to data types That You Can Use in PowerBuilder, use · The Date (datetime) function to convert a DateTime value to a PowerBuilder date value after reading from a database · The Time (datetime) function to convert a DateTime value PowerBuilder to a time value after reading from a database · The DateTime (date, time) function to convert a date and (optional) time to a DateTime Before writing to a DateTime column in a media databasePowerBuilder microseconds in the database interface for "any DBMS That supports microseconds.
    6. December gold Decimal : Signed decimal numbers up to 18 digits.You With Cdn Place The decimal point anywhere Within The 18 digits. For example, 123,456, 12345678901234.5678 0.000000000000000001 gold.
    7. Double : A Signed floating-point number with 15 digits of precision and a range from 2.2E-308 to 1.7E +308.
    8. Integer or Int : Signed 16-bit integers, from -32768 to +32767.
    9. Long : Signed 32-bit integers, from -2,147,483,648 to +2,147,483,647.
    10. Real : A floating-point number Signed With six digits of precision and a range from 1.17 to 3.4 E -38 E +38.
    11. String : Any ASCII characters with variable length (0 to 60,000).
    12. Time : The Time in 24-hour format, Including the Hour (00 to 23), minutes (00 to 59), second (00 to 59), and fraction of second (up to six digits) With A range from 0:00:00 to 23 : 59:59.999999. PowerBuilder supports microseconds in the database interface for DBMS That "any support microseconds.
    13. UnsignedInteger, UnsignedInt, or UInt : 16-bit unsigned integers, from 0 to 65.535.
    14. UnsignedLong gold ULong : 32-bit unsigned integers, from 0 to 4,294,967,295.

  5. #5
    Join Date
    May 2009
    Posts
    201

    Re: Tips for PowerScript Painter

    Declarations : Examples of statements of values ​​to variables:
    Code:
    Integer NumberDays 
    
    Real MontantDu 
    
    String CustomerName, AdresseClient 
    
    PasseDu Integer = 30, = 60 Delinquent 
    
    Real ValeurPi = 3.1416 
    
    Real ValeurPi constant = 3.1416
    By adding the word before the Constant declaration is assured that the value can not be changed by code in the script.

    Operators : The usual operators are available: +, -, *, /, ^

    and the assignment operators: + + - + = -= *= / = ^ =

    With variables of type String + sign denotes a concatenation.
    Code:
    String alpha, beta chain 
    alpha = "String split" 
    beta = "two parties" 
    string = alpha + beta
    The usual comparison operators are used: => <<=> = <>

Similar Threads

  1. What is the keyboard shortcut Format Painter
    By Victor Kam in forum MS Office Support
    Replies: 5
    Last Post: 29-08-2011, 11:59 PM
  2. corel painter 11 does not install in Windows 7
    By Diellza in forum Operating Systems
    Replies: 6
    Last Post: 19-07-2011, 07:31 PM
  3. Format Painter Keyboard Shortcut
    By cpumplun in forum Hardware Peripherals
    Replies: 3
    Last Post: 21-05-2010, 04:28 AM
  4. Download Corel Painter 11
    By Sam.D in forum Windows Software
    Replies: 3
    Last Post: 26-02-2009, 05:37 PM
  5. Replies: 2
    Last Post: 12-05-2008, 05:49 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,667,241.57447 seconds with 17 queries