Results 1 to 2 of 2

Thread: PASCAL Question

  1. #1

    Thread Starter
    Frenzied Member Vlatko's Avatar
    Join Date
    Aug 2000
    Location
    Skopje, Macedonia
    Posts
    1,409

    PASCAL Question

    If you know PASCAL:

    C++ code:
    Code:
    //C++
    int value = 50;
    int *myarray = new int[value]
    But how to do it in PASCAL
    If i know the number of elements of the array i would do
    Code:
    var myarray:array[1..100] of integer;
    {but how do i declare an array on the heap in PASCAL}
    I am become death, the destroyer of worlds.
    mail:[email protected]

    • Visual Basic 6.0 & .NET
    • Visual C++ 6.0 & .NET
    • ASP
    • LISP
    • PROLOG
    • C
    • Pascal

  2. #2
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    There's a new() function, similar to malloc() in C, which does that. I don't remember the exact syntax for it though...
    Harry.

    "From one thing, know ten thousand things."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width