Jump to content

Cicode: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
m refine cat
Fiftyquid (talk | contribs)
m Fixed Windows disambiguation link
Line 15: Line 15:
| influenced_by =
| influenced_by =
| influenced =
| influenced =
| operating_system = [[DOS]] [[Windows]]
| operating_system = [[DOS]] [[Microsoft Windows|Windows]]
| license =
| license =
| website = http://www.citect.com/
| website = http://www.citect.com/

Revision as of 18:36, 4 June 2008

Cicode
Designed byCitect
Stable release
7.0.0 / August 2007
OSDOS Windows
Websitehttp://www.citect.com/

Cicode is the programming language used by CitectSCADA software which contains a set of GUI which generate Cicode programs and has an interpreter for running the Cicode program.

The structure and syntax of Cicode is very similar to that of the Pascal programming language, the main difference being that it does not include pointers and associated concepts. Citect provides a rich programming API that includes sophisticated programming constructs such as concurrent tasks and semaphores.

Samples

The function is used to log information to a file.

FUNCTION I0_Trace(STRING sPrompt)

   INT    hDev;
   INT    hTime;
   STRING sText;

   IF hTraceOn THEN
      IF (StrLeft(sPrompt, StrLength(sMask)) = sMask) THEN
         TraceMsg(sPrompt);

         hTime = TimeCurrent();
         sText = TimeToStr(hTime, 2)+" "+TimeToStr(hTime, 1)+" "+sPrompt;

         SemWait(hDebugSem, 10);
         FileWriteLn(hDebugFile, sText);
         SemSignal(hDebugSem);
      END
   END
END