Popular Posts

Monday, November 7, 2011

Pascal As Object Oriented Programing




         Object Pascal refers to a branch of object-oriented derivatives of Pascal, mostly known as the primary programming language of Embarcadero Delphi.
Object Pascal is an extension of the Pascal language that was developed at Apple Computer by a team led by Larry Tesler in consultation with Niklaus Wirth, the inventor of Pascal. It is descended from an earlier object-oriented version of Pascal called Clascal, which was available on the Lisa computer.
    Object Pascal was needed in order to support MacApp, an expandable Macintosh application framework that would now be called a class library. Object Pascal extensions and MacApp itself were developed by Barry Haynes, Ken Doyle, and Larry Rosenstein, and were tested by Dan Allen. Larry Tesler oversaw the project, which began very early in 1985 and became a product in 1986.
Apple dropped support for Object Pascal when they moved from Motorola 68K chips to IBM's PowerPC architecture in 1994.
      An Object Pascal extension was also implemented in the Think Pascal IDE. The IDE includes the compiler and an editor with Syntax highlighting and checking, a powerful debugger and a class library. Many developers preferred Think Pascal over Apple's implementation of Object Pascal because Think Pascal offered a tight integration of its tools. The development stopped after the 4.01 version because the company was bought by Symantec. The developers then left the project.



    Pascal And Delphi


    This article is a comparison between Pascal and Delphi because Borland, the original manufacturer of Delphi, once used Delphi for their version of the Pascal-based programming language used in the product, which is otherwise known as Object Pascal. Compatibles still maintain the Object Pascal designation because Delphi is a registered trademark.
    Pascal is a programming language, developed in 1970 by Niklaus Wirth. The original Pascal employed a bootstrapping construct where each successively more complicated compiler compiled the next iteration. Thus the compiler P2 was written in the dialect compilable by P1, and could in turn compile P3, and such on all the way till P5 which implemented "full" Pascal and was more optimized.
    Borland Corporation, like the wildly popular UCSD Pascal before them, took the P4 subset compiler as their basis for their Turbo Pascal range, probably because they considered it more efficient on the micros they were targeting. Over time their dialect implemented many UCSD extensions to the original Pascal like the "string" type. Their language went through several versions and names, such as Turbo Pascal, Borland Pascal, and finally Delphi Pascal. This page briefly goes over the differences between those dialects of the language. It does not go into the extensions provided by Delphi, that is the subject of a Delphi page. Rather it just covers the differences that exist between the base implementations.

    Contents

      [hide

    [edit]Terminology

    It is correct to refer to "Pascal" in general as Niklaus Wirth's original language (and derivatives) and Borland's dialect as "Delphi". When referring to Borland's previous dialects, the terms "Turbo Pascal", and "Borland Pascal" apply.
    The term "ISO 7185" or "ISO 7185 Pascal" is used here as synonymous with Niklaus Wirth's programming language Pascal. The ISO 7185 standard is the standardized version of Niklaus Wirth's language, as he has stated several times.

    [edit]Differences between the languages

    Because Borland Delphi is a widely used version of Pascal, it is useful to compare the two languages. Note that here are presented only the differences between Borland Delphi and the basic ISO 7185 standard. Undiscussed are any extensions provided by Borland Delphi. In other words, this section answers the question "why doesn't my standard Pascal program run under Borland Delphi?", and perhaps "what can I write in Borland Delphi that will also be compatible with the ISO 7185 standard?".
    1. Procedures and functions may not appear as parameters (it is true that it can be done, but a non-standard syntax must be used).
    2. Goto statements cannot reference targets outside procedure/function bodies (so called "intraprocedural gotos").
    3. No file buffer variable handling. Standard Pascal has file "buffer variables", and "get" and "put" procedures to operate on them. This functionality is not present in Borland Delphi.
    4. No "sized" dynamic variable allocation. Given a variant record, the size of a particular variant cannot be specified as per the standard. I.e., the following statement is invalid:
    new(p, t)
    
    Where t is a variant record tag type.
    5. The functions "pack" and "unpack" are not implemented.
    6. { and (*, } and *) are not synonyms of each other as required by the standard. I.e.:
    { comment *)
    
    is not valid in Borland Delphi (Delphi uses the scheme of allowing the different comment types to indicate nested comments). It is valid in Turbo Pascal though.
    7. Does not replace eoln with space as the standard requires. When reading through the end of a line, the eoln character is supposed to be replaced with a space in ISO 7185. Instead, reading through eoln in Borland Delphi gives the character code for carriage return (13), followed by line feed (10).
    8. Numbers and booleans are not printed out in their "default" field widths, but are printed in the minimum amount of space. For example:
    write(5);
    write(55);
    
    is equivalent to:
    write(5:1);
    write(55:2);
    
    in Delphi, but:
    write(5:TotalWidth);
    write(55:TotalWidth);
    
    in ISO 7185, where TotalWidth is implementation-defined.
    For booleans:
    write(false);
    write(true);
    
    is equivalent to:
    write('false':5);
    write('true':4);
    
    in Delphi, but:
    write('false':TotalWidth);
    write('true':TotalWidth);
    
    in ISO 7185, where TotalWidth is implementation-defined.
    9. Temporary files are not supported. Executing reset() or rewrite() results in an error under Delphi. Under standard Pascal it opens a temporary file that exists only for the run of the program.

    Implementations of Pascal


    The first Pascal compiler was designed in Zürich for the CDC 6000 series mainframe computer family. Niklaus Wirth reports that a first attempt to implement it in Fortran in 1969 was unsuccessful due to Fortran's inadequacy to express complex data structures. The second attempt was formulated in the Pascal language itself and was operational by mid-1970. Many Pascal compilers since have been similarlyself-hosting, that is, the compiler is itself written in Pascal, and the compiler is usually capable of recompiling itself when new features are added to the language, or when the compiler is to be ported to a new environment. The GNU Pascal compiler is one notable exception, being written in C.
    The first successful port of the CDC Pascal compiler to another mainframe was completed by Welsh and Quinn at the QUB in 1972. The target was the ICL 1900 series. This compiler in turn was the parent of the Pascal compiler for the ICS Multum minicomputer. The Multum port was developed – with a view to using Pascal as a systems programming language – by Findlay, Cupples, Cavouras and Davis, working at the Department of Computing Science in Glasgow University. It is thought that Multum Pascal, which was completed in the summer of 1973, may have been the first 16-bit implementation.
    A completely new compiler was completed by Welsh et al. at QUB in 1977. It offered a source-language diagnostic feature (incorporating profiling, tracing and type-aware formatted postmortem dumps) that was implemented by Findlay and Watt at Glasgow University. This implementation was ported in 1980 to the ICL 2900 series by a team based at Southampton University and Glasgow University. The Standard Pascal Model Implementation was also based on this compiler, having been adapted, by Welsh and Hay at Manchester University in 1984, to check rigorously for conformity to the BSI 6192/ISO 7185 Standard and to generate code for a portable abstract machine.
    The first Pascal compiler written in North America was constructed at the University of Illinois under Donald B. Gillies for the PDP-11 and generated native machine code.
    To propagate the language rapidly, a compiler "porting kit" was created in Zurich that included a compiler that generated code for a "virtual" stack machine (i.e. code that lends itself to reasonably efficient interpretation), along with an interpreter for that code - the Pascal-P system. The P-system compilers were termed Pascal-P1, Pascal-P2, Pascal-P3, and Pascal-P4. Pascal-P1 was the first version, and Pascal-P4 was the last to come from Zurich.
    The Pascal-P4 compiler/interpreter can still be run and compiled on systems compatible with original Pascal. However, it only accepts a subset of the Pascal language.
    Pascal-P5, created outside of the Zurich group, accepts the full Pascal language and includes ISO 7185 compatibility.
    UCSD Pascal branched off Pascal-P2, where Kenneth Bowles utilized it to create the interpretive UCSD p-System
    A compiler based on the Pascal-P4 compiler, which created native binaries, was released for the IBM System/370 mainframe computer by the Australian Atomic Energy Commission; it was called the "AAEC Pascal Compiler" after the abbreviation of the name of the Commission.
    In the early 1980s, Watcom Pascal was developed, also for the IBM System 370.
    IP Pascal was an implementation of the Pascal programming language using Micropolis DOS, but was moved rapidly to CP/M running on theZ80. It was moved to the 80386 machine types in 1994, and exists today as Windows/XP and Linux implementations. In 2008, the system was brought up to a new level and the resulting language termed "Pascaline" (after Pascal's calculator). It includes objects, namespace controls, dynamic arrays, along with many other extensions, and generally features the same functionality and type protection as C#. It is the only such implementation which is also compatible with the original Pascal implementation (which is standardized as ISO 7185).
    In the early 1980s, UCSD Pascal was ported to the Apple II and Apple III computers to provide a structured alternative to the BASICinterpreters that came with the machines.
    Apple Computer created its own Lisa Pascal for the Lisa Workshop in 1982 and ported this compiler to the Apple Macintosh and MPW in 1985. In 1985 Larry Tesler, in consultation with Niklaus Wirth, defined Object Pascal and these extensions were incorporated in both the Lisa Pascal and Mac Pascal compilers.
    In the 1980s Anders Hejlsberg wrote the Blue Label Pascal compiler for the Nascom-2. A reimplementation of this compiler for the IBM PCwas marketed under the names Compas Pascal and PolyPascal before it was acquired by Borland. Renamed to Turbo Pascal it became hugely popular, thanks in part to an aggressive pricing strategy and in part to having one of the first full-screen Integrated development environments, and fast turnaround-time (just seconds to compile, link, and run.) Additionally, it was written and highly optimized entirely inassembly language, making it smaller and faster than much of the competition. In 1986 Anders ported Turbo Pascal to the Macintosh and incorporated Apple's Object Pascal extensions into Turbo Pascal. These extensions were then added back into the PC version of Turbo Pascal for version 5.5. At the same time Microsoft also implemented the Object Pascal compiler.[6][7] Turbo Pascal 5.5 had a large influence on the Pascal community, which began concentrating mainly on the IBM PC in the late 1980s. Many PC hobbyists in search of a structured replacement for BASIC used this product. It also began to be adopted by professional developers. Around the same time a number of concepts were imported from C to let Pascal programmers use the C-based API of Microsoft Windows directly. These extensions included null-terminated stringspointer arithmeticfunction pointers, an address-of operator and unsafe typecasts.
    However, Borland later decided it wanted more elaborate object-oriented features, and started over in Delphi using the Object Pascal draft standard proposed by Apple as a basis. (This Apple draft is still not a formal standard.) The first versions of the Delphi language were accordingly named Object Pascal. The main additions compared to the older OOP extensions were a reference-based object model, virtual constructors and destructors, and properties. Several other compilers also implement this dialect.
    Turbo Pascal, and other derivatives with units or module concepts are modular languages. However, it does not provide a nested module concept or qualified import and export of specific symbols.
    Super Pascal was a variant which added non-numeric labels, a return statement and expressions as names of types.
    The universities of ZurichKarlsruhe and Wuppertal have developed an EXtension for Scientific Computing (Pascal XSC), which provides a free solution for programming numerical computations with controlled precision.

    Born Of Pascal

    Pascal was developed by Niklaus Wirth and based on the ALGOL programming language, named in honor of the French mathematician and philosopher Blaise Pascal.
    Prior to his work on Pascal, Wirth had developed Euler and ALGOL W and later went on to develop the Pascal-like languages Modula-2 andOberon.
    Initially, Pascal was largely, but not exclusively, intended to teach students structured programming.[4] A generation of students used Pascal as an introductory language in undergraduate courses. Variants of Pascal have also frequently been used for everything from research projects to PC games and embedded systems. Newer Pascal compilers exist which are widely used.[5]
    Pascal was the primary high-level language used for development in the Apple Lisa, and in the early years of the Mac. Parts of the originalMacintosh operating system were hand-translated into Motorola 68000 assembly language from the Pascal sources. The popular typesettingsystem TeX by Donald E. Knuth was written in WEB, the original literate programming system, based on DEC PDP-10 Pascal, while an application like Total Commander was written in Delphi (Object Pascal).
    Object Pascal is still widely used for developing Windows applications such as Skype.[citation needed] A cross-platform version called Free Pascal, with the Lazarus IDE, is popular with Linux users since it promises write once, compile anywhere, development.
    The original Standard Pascal was in many ways a different language from the Object Pascal that most people today are familiar with, being much simpler but also more limited.
    Dr. Wirth himself did not intend Pascal for systems programming, and his ongoing language evolution were the languages Modula-2 and Oberon. Both languages are related to Pascal in a similar way as C++, C# and Java are related to C. Oberon-2 supports all concepts of object-oriented programming. In contrast to the C language family, in the course from Pascal to Oberon the language definition got a lot more compact, but the language itself got more powerful.
    The successors of Pascal were developed to address the weaknesses of Pascal in this regard. However, with the widespread adoption of the Object Pascal extensions (e.g.. unit, bitwise operators), many of these weaknesses (most specifically the lack of support for separate compilation) were eliminated. The reputation of Pascal as a toy language has unfairly persisted in many places however.

    Wednesday, November 2, 2011

    Why is Twitter important?


    Twitter in Indonesia are slowly beginning to much-loved, maybe after a little bored with Facebook, so the netter (especially perhaps the Blackberry users) began to look for alternative communication other than Facebook, and Twitter became popular choice is plentiful. Not only is it on any televisions Indonesia we start adding Twitter (In addition to Facebook and YM) as a means of interactive communication between television viewers with an ongoing event.


    Whether it's Twitter? A simple question, then what's the difference with Facebook or Friendster? and how to use it?


    Twitter is a Miniature Blog (Micro Blogging)


    Micro Blogging is a brief update on something (whether it's an event, which is being undertaken or news updates) are presented in brief the character. If you are a Facebook user, may be familiar with the name Status Update, now the main activity on Twitter is not much different from the status update. With twitter you can update your status, so that the follower (follower) you can find out what, where, or what are your current writing status.


    Micro Blogging has become an alternative for people who want a blog but do not want nge-blog. A personal blog will contain important information that deserves to be presented to the public, but in reality not everyone likes to write long and wide or explain in detail about something. Sometime you just want to say to your friends or public kalayak "Watch Out Film Transformer and turned out a very impressive film" Just like that to express your admiration for the Transformers movie and you did not intend to write a summary or synopsis of the film is long and wide, as was discussed in many blogs.


    Well, Twitter was present for the activities of micro blogging like the illustration above, you can inform something brief and concise, without needing or having to explain the length and width. Simply the subject or the most important things only.


    Twitter is a Social Messaging


    With the ability to follow people (Follow People) or have a follower (Follower) then Twitter has become a kind of social messaging, where we can communicate with people who became followers of us or with the people we follow. With the Twitter we can quickly and easily communicate and gather people or our friends. Simply we update Twitter "Gather on Campus at 18:00", then all the people (followers or friends) we will simultaneously receive the information, and finally gathering activities can be coordinated.


    Twitter is Delivered Quickly In Brief


    If you are to follow famous people or a television station such as CNN, then you also will receive the latest news with a short and quick, so you can keep up to date with news and events from around the world via Twitter.



    Use of Twitter For MSMEs


    Twitter is a social network of the most widely used by business model B2C (Business-to-Consumer), in addition to up mainly by the Micro, Small and Medium Enterprises (MSMEs).

    Currently MSMEs in Indonesia continues to grow with the growth rate of 2.7% annually. With the contribution of SMEs to Gross Domestic Product (GDP), according to data from the Central Bureau of Statistics (BPS), about 31%, they also absorb 87% of the workforce.


    The highest sector of the investment made is in the service sector (57%), trade (20%) and manufacturing (23%). In the world, SMEs have accounted for 55% of world GDP by absorbing 65% of the workforce.



    How to Start?


    As a first step, making a Twitter account can be done, accompanied by photographs, which usually contains the logo of the company, biography contains brief profiles of companies and links with the company's web site address.


    Use applications and tools from www.clickablenow.com and www.twittercustomizer.com to customize the background of your company's Twitter profile.


    Afterward, Twitter account in different directories can be executed. Companies will be asked to enter some relevant keywords so that it will facilitate the Twitter users (tweeps) including the company itself in the search and follow the account in accordance with the interests and needs.


    In order to account known it is necessary promotional activities through various media, especially the conventional media both above and below the line. If already have a number of followers which is considered sufficient, tweet can start on-post.


    As with other promotional activities, promotional accounts need to be continuous and sustained to attract more tweeps both old and new. Any mention or reply is received, if relevant, and indeed need to be addressed, should be returned.


    Form of cultivated variety of content. In addition to text, information sharing in the form of photographs about the activities of companies such as gathering, outing, workshops, seminars, conferences are also absolutely necessary. To find out what emerging topics discussed by the Tweeps, Twitter Trend should be monitored.


    Twitter Search facility can be used to track tweets related to your company. If you need a reply, responslah tweet.


    Acknowledgements can be given to the follower and the tweeps who do retweeting and provide feedback (suggestions, ideas, criticisms, complaints and compliments) about the company (cocreation activity).

    From employees, to the Community

    In addition to a corporate account, the firm's employees including the management is expected to also have an individual account. Promotion on account of employees carried out by the company account and this is true vice versa.

    There have been many owners and employees of the company that lists a Twitter account in his name card and other forms of marketing collateral. Accounts of employees tend to be more flexible, because with this account information and stories outside of work and companies such as social life, humor, interests, hobbies can be channeled.

    For "fishing" interactivity, can use the question, while to gain attention, can make up ReTweet tweets that contain praise and thanks from followers and other tweeps.

    To attract more tweeps, share tips and information about the industry and core business for the community / communities worth a try.

    Dictum that "The Twitter community values ​​interaction with real people." Clearly invalid. Where communities have been formed, then it could be developed and managed as possible and make them a loyal community by organizing community-based programs and activities (community activation).

    The results of McKinsey and Co. research. states that two thirds of the world economy is affected by personal recommendation and 78% more potential buyers to trust recommendations from other buyers according to a survey conducted by Neilsen Global Trust.

    Assume that the follower is the purchaser, consumer, our customers alone is less precise. SMEs can use Twitter to recruit new employees, new partners, new suppliers, new retailers and so on.

    300 million Twitter users up to now a shareholder of your company. As with other social networking, Twitter can be used to share information about the presentations, video, audio, jobs, programs, discounts, surveys and other activities of the company.

    Follow the experts, peers, industry leaders and if necessary, your competitors, to enrich the information that is relevant and useful to the progress and growth of the company. To manage the following, follower, or search for tweeps who want to follow the account can take advantage of features of Twitter Lists.

    Limitations Twitter

    It should be kept in mind that Twitter has some "limitations". Direct Message 250 per day, 1000 tweets per day (post or reply), 1000 accounts can follow per day is a limitation that applies to all the good access the web, mobile, and third-party applications.

    As affirmed Twitter, they "facilitate" social networking, they are not a social networking site. Twitter oversee the activities of auto-following and unfollowing too massive strictly.

    The purpose limitation is to maintain comfort and stability of social networks in which the auto-follow-back (follow the follower accounts after they followed our account) is allowed and encouraged while the auto-unfollowing is not allowed.

    Management accounts can be done by the owner, management company or the marketing department employees. Along with growing companies and increasing the role of follower and social networking for companies, if the account is managed by a shared human resources, account management might need to be entrusted to a dedicated human resources or outsourced to these service providers.

    Account manager must have adequate knowledge and competence of telematics, especially social networking, Twitter etiquette, the ins and outs of the company including the vision, mission, goals and short-term goals and long-term.

    Of particular interest is the number of sites and third party applications that offer a variety of additional functions such as searching for information follower, following, account of other Tweeps, to increase the number of followers.

    Search this web site applications and in depth as to provide a username and password to them, then your account will be exposed to spam, fraud, phishing .

    With the business prospects of MSMEs in Indonesia that utilizes ICT as a medium which is expected to reach 18.6 trillion in 2014, jumped 60.3% of the value of business last year, with its use of social networking strategy is appropriate, will be born many success stories  in the future.


    Technology