SET or Enum Question

From: Steve Reiss (NoSPAM_at_cruzio.com)
Date: 02/27/05

  • Next message: Toon Krijthe: "Re: SET or Enum Question"
    Date: Sun, 27 Feb 2005 14:43:35 -0800
    
    

    Hi All!

    I have a section of Delphi 7 code that I want to perform certain
    operations on files with various extensions.

    Basically, I want to have it so that I can add additional file extensions
    to a list and call similar routines.

     

    type

      ValidFileExtensions = (exe, dll, ocx); <-- the valid file extensions

    // ValidExtensions = set of ['.dll', '.ocx']; <<-- didn't work

    var

      CheckExtensions : ValidFileExtensions;

            // Get the version info from selected file types:

            if (sCurrentExtension = '.exe') OR (sCurrentExtension = '.dll') OR (sCurrentExtension = '.ocx') Then
    // if sCurrentExtension IN CheckExtensions Then <<--- Operation Not allowed!

            begin
              sVersionInfo := ReadVerInfo(sCurrentFile);
    ....
            end;

    Any help on this would be greatly appreciated!

     
    Steve

    Paradox Database Consulting Page :
    http://members.cruzio.com/~stever/index.html
    +-------------------------------------------------------------+
    Anti-SPAM Device in Place :
    To Reply : REMOVE "NoSpam" and replace it with "stever"
    +-------------------------------------------------------------+


  • Next message: Toon Krijthe: "Re: SET or Enum Question"

    Relevant Pages

    • Re: WinHEC / 16 bits dead
      ... CsGL and SharpGL were abandonned because the necessary declarations ... Extensions support is quite compulsory ... > any other version of Delphi. ... you want to be able to use performance OpenGL extensions for what ...
      (borland.public.delphi.non-technical)
    • Re: Large public source archives? Delphi file extensions?
      ... 1300 use Delphi or Kylix. ... source-code files. ... The project files, DPR and DPK, rarely contain any ... There are a handful of common C++ extensions, ...
      (borland.public.delphi.language.objectpascal)
    • Re: Large public source archives? Delphi file extensions?
      ... > public Delphi source archives - I will test my tool on them. ... > Right now I know only four such extensions: PAS DPR DPK INC ... Probably over 99% of all Delphi code ever written is in a PAS ...
      (borland.public.delphi.language.objectpascal)
    • Re: Current test version of Chess 0.5
      ... given the number of programmers they employ. ... > with extensions, ... From Delphi 7 onwards, ... CFB Software ...
      (comp.lang.pascal.misc)
    • Re: Hackish file -> string trick
      ... Imagine some rather simple extensions to Delphi ... Naming could be relatively simple, ...
      (comp.lang.pascal.delphi.misc)