Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program Project1;
- {$APPTYPE CONSOLE}
- uses
- StrUtils;
- type
- TMyOSPlatform = (Windows, OSX, iOS, Android);
- TProperties = (Width, Height, MarginLeft);
- const
- PropValues: array[TMyOSPlatform, TProperties] of Double = (
- (121, 22, 40), (128, 24, 40), (138, 24, 40), (140, 28, 40)
- );
- PropNames: array[TProperties] of string = ('Width', 'Height', 'MarginLeft');
- const
- IDAktPlatform = TMyOSPlatform.Windows;
- function ByPlatform(const Prop: string): Single;
- begin
- Result := PropValues[IDAktPlatform, TProperties(IndexText(Prop, PropNames))];
- end;
- begin
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement