Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
X# examples - Readability
Message
De
30/10/2019 13:27:11
 
 
À
30/10/2019 10:37:44
Information générale
Forum:
Visual FoxPro
Catégorie:
VFP Compiler for .NET
Divers
Thread ID:
01671739
Message ID:
01671743
Vues:
76
Hi Koen,
>Sys(1) = Julian date
>ans Sys(1234) does not exsist in VFP so I assume you are referring to sys() in .NET and not in VFP.
>For the readable I dont get it. What have these sys() functions to do with this piece of coding?

Actually everything, but thanks for the effort of looking up what those mean... No way anybody would actually know out the top of their heads the meaning of 1, 1234 and since there are thousands of them, need to look them up each time one has to use it...
ENUM SysType
  MEMBER Julian := 1
  ...
  MEMBER NotExist := 1234
  ....
END ENUM

&& In our code then
LOCAL myType AS SysType
....
SWITCH myType
  CASE Julian
    ? "Do what you need to do"
  CASE NotExist
    ? "Do the not exist thingy"
  ....
  OTHERWISE
    ? "Don't know "
END SWITCH
Johan Nel
George, South Africa
Friend of XSharp (FOX) member
E-mail : johan(dot)nel(at)xsinet(dot)co(dot)za
Web site : https://xsharp.info
X# runtime : https://github.com/X-Sharp/XSharpPublic
Radio talk : https://blog.aksel.com/2019/07/why-xsharp-might-be-tool-foxpro.html
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform