Recent

Author Topic: Function which Return a Set of System.Int64; [?]  (Read 3704 times)

engkin

  • Hero Member
  • *****
  • Posts: 3112
Re: Function which Return Requirement of System.Int64; [?]
« Reply #15 on: May 25, 2019, 11:03:37 pm »
Code: Pascal  [Select][+][-]
  1. Result := false;
  2. case myStructure of                //[?]RequirementsDatabase
  3.  
  4. 1: case myNumber of                //[?]RequiredNumber;
  5.    100..200: Result := true;
  6.    end;
  7. 2: case myNumber of                //[?]RequiredNumber;
  8.    1000..2000: Result := true;
  9.    end;
  10.  
  11. end;
Code: Pascal  [Select][+][-]
  1.   Result :=
  2.     ((myStructure=1) and (myNumber>=100) and (myNumber<=200))
  3.     or
  4.     ((myStructure=2) and (myNumber>=1000) and (myNumber<=2000))
  5.     ;

guest62577

  • Guest
Re: Function which Return a Set of System.Int64; [?]
« Reply #16 on: May 26, 2019, 01:48:29 am »
Detailed Explanation of Proceedings (World Illustration)

the (Sample Code) function is used as a fantasy code organization, allowing access to the tag structure at development time; [...]
Code: Pascal  [Select][+][-]
  1. function Test(myStructure:System.Byte; myNumber:System.Int64):System.Boolean;
  2. begin
  3. result := False;
  4.   case myStructure of                //[?]RequirementsDatabase
  5.  
  6.   1: case myNumber of                //[?]RequiredNumber;
  7.      100..200: Result := true;
  8.      end;
  9.   2: case myNumber of                //[?]RequiredNumber;
  10.      1000..2000: Result := true;
  11.      end;
  12.  
  13.   end;
  14. end;

the IndexOf myStructure is used to filter occurrences when the project is updated, in the example being able to change the number 1 by -1 invalidating the calls;
myNumber could also being changed by altering the values: 100,102..200

(Sample Code: Usage)
this code makes access to the 101 tag which would execute the begin\end code;
Code: Pascal  [Select][+][-]
  1. if test(1,101) then   //could be commented if not required;
  2. begin
  3. mypretty := mirror1;
  4.  with mirror1 do
  5.  System.Exit;
  6. end else ShowMessage('test returned IndexOutOfRange');
this logic could be removed from the final compilation by commenting the all test occurrences; (if necessary\wanted)
when for whatever reason the project changes the meaning for accessing the 101 tag,
it could return a error indicating that work has to be made for the updated processes;

jamie

  • Hero Member
  • *****
  • Posts: 6077
Re: Function which Return a Set of System.Int64; [?]
« Reply #17 on: May 26, 2019, 01:57:44 am »
If you want my opinion, I think you're wasting yours and everyone else's time here.

All I see is a bunch of rhetoric.
 
The only true wisdom is knowing you know nothing

 

TinyPortal © 2005-2018