Results 1 to 10 of 17

Thread: Prometheus - A first working demo

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25
    Quote Originally Posted by de_jean_7777 View Post
    Or you could use the DirectorySeparator constant.
    e.g.
    Code:
    LoadImage('resources'+DirectorySeparator+'visual'+DirectorySeparator+'Ring.png');
    Sure, the constants identifier is a bit long, but it makes paths portable accross any platform.
    this can sort of be compensated by just making your own local variable...
    Code:
    var
      dslash : String = DirectorySeparator;
    I'm sure you can't assign values from variables inside a const statement. And if this form of assignment doesn't work, which I think I remember it can, only if it's a global variable not a local variable inside a function of procedure.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  2. #2
    PGDCE Developer de_jean_7777's Avatar
    Join Date
    Nov 2006
    Location
    Bosnia and Herzegovina (Herzegovina)
    Posts
    287
    Quote Originally Posted by WILL View Post
    Code:
    var
      dslash : String = DirectorySeparator;
    I'm sure you can't assign values from variables inside a const statement.
    You cannot, but this works as DirectorySeparator is an untyped constant. dsslash should also be kept an untyped constant, as it never changes throughout the program.
    Existence is pain

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
  •