"Fossies" - the Fresh Open Source Software Archive

Member "MACE1.6.0/exampleScripts/circleStructure/circle.txt" (15 Aug 2018, 1291 Bytes) of package /windows/misc/MACE1.6.0.zip:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 %Copyright (C) 2012-2018 Jan Christian Rohde
    2 %
    3 %This file is part of MACE.
    4 %
    5 %MACE is free software; you can redistribute it and/or modify it under the terms of the
    6 %GNU General Public License as published by the Free Software Foundation; either version 3
    7 %of the License, or (at your option) any later version.
    8 %
    9 %MACE is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
   10 %even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   11 %GNU General Public License for more details.
   12 %
   13 %You should have received a copy of the GNU General Public License
   14 %along with MACE; if not, see http://www.gnu.org/licenses.
   15 
   16 % This example shows how to use records to realize structures and to work with these structures.
   17 
   18 setCharacteristic(0)
   19 
   20 % input of circle variables
   21 input(centerXCoord)
   22 input(centerYCoord)
   23 input(radius)
   24 
   25 %store the variables as a circle
   26 record(circle,exampleScripts/circleStructure/inputCircle.txt,centerXCoord,centerYCoord,radius)
   27 
   28 %input of a plane point
   29 input(XCoord)
   30 input(YCoord)
   31 
   32 % Check: Is the point inside the circle?
   33 record(circle,exampleScripts/circleStructure/insideCircle.txt,XCoord,YCoord)->(inside)
   34 
   35 if inside {
   36     "The point is inside of the circle":
   37 } else {
   38     "The point is outside of the circle":
   39 }