From: Ivan Denisov Date: Fri, 20 May 2016 05:35:30 +0000 (+0700) Subject: Cons log implementation changed, documentation were added for ConsLog and Console. X-Git-Url: http://deadsoftware.ru/gitweb?p=bbcp.git;a=commitdiff_plain;h=d27c303afd74fe5cda7b9cbbe804a576f265ba61 Cons log implementation changed, documentation were added for ConsLog and Console. --- diff --git a/BlackBox/Cons/Docu/Log.odc b/BlackBox/Cons/Docu/Log.odc new file mode 100644 index 0000000..ca37328 Binary files /dev/null and b/BlackBox/Cons/Docu/Log.odc differ diff --git a/BlackBox/Cons/Mod/Log.odc b/BlackBox/Cons/Mod/Log.odc index 722604d..ded945a 100644 Binary files a/BlackBox/Cons/Mod/Log.odc and b/BlackBox/Cons/Mod/Log.odc differ diff --git a/BlackBox/System/Docu/Console.odc b/BlackBox/System/Docu/Console.odc new file mode 100644 index 0000000..054e9e4 Binary files /dev/null and b/BlackBox/System/Docu/Console.odc differ diff --git a/BlackBox/_Linux_/Lin/Mod/Log.odc b/BlackBox/_Linux_/Lin/Mod/Log.odc deleted file mode 100644 index 4bfeb14..0000000 Binary files a/BlackBox/_Linux_/Lin/Mod/Log.odc and /dev/null differ diff --git a/examples/console/README b/examples/console/README deleted file mode 100755 index 852c2b5..0000000 --- a/examples/console/README +++ /dev/null @@ -1,22 +0,0 @@ -Example to demonstrate ConsCompiler and ConsLog. - -ConsCompiler allows to compile sources stored in "txt" format. -ConsLog provides realisation for the Log abstract interface. - -Author of the example: Ivan Denisov, denisov@molpit.org - -Installation and demonstration - -1. Prepare Interp version of BlackBox in "Linux_Interp" folder: - ./switch-target `uname -s` Interp - ./build - ./export ../Linux_Interp - -2. Compile this example: - cd ../examples/console - echo "ConsCompiler.Compile('System/Mod', 'Init.txt')" | ./runc - -3. For demonstration run: - ./runc 123 123 - -Output will contain: "Summ: 246.0". diff --git a/examples/console/System/Mod/Init.txt b/examples/console/System/Mod/Init.txt deleted file mode 100644 index 190d9df..0000000 --- a/examples/console/System/Mod/Init.txt +++ /dev/null @@ -1,39 +0,0 @@ -MODULE Init; - - IMPORT - Kernel, - HostConsole (* Console.SetHook *) , - - HostFonts (* Fonts.SetHook; required for Texts *), - HostWindows (* Windows.SetHook *), - HostDates (* Dates.SetHook *), - HostDialog (* Dialog.SetShowHook *), - StdInterpreter (* Dialog.SetCallHook *) , - StdDialog (* Views.SetViewHook *), - - Log, ConsLog, (* Log.Hook *) - Strings, - Converters (* .odc *), - Dialog; - - PROCEDURE Init; - VAR - c1, c2, res: INTEGER; a, b: REAL; - BEGIN - IF Kernel.bootInfo.argc = 3 THEN - Strings.StringToReal(Kernel.bootInfo.argv[1]$, a, c1); - Strings.StringToReal(Kernel.bootInfo.argv[2]$, b, c2); - IF (c1 = 0) & (c2 = 0) THEN - Log.String("Summ: "); Log.Real(a + b); Log.Ln - ELSE - Log.String("The arguments should be in the form of real: 13123.556"); Log.Ln - END - ELSE - Log.String("Example of simple console application based on BlackBox Component Builder."); Log.Ln; - Log.String("You can pass two arguments and sum of them will be returned."); Log.Ln - END - END Init; - -BEGIN - Init -END Init. \ No newline at end of file diff --git a/examples/console/runc b/examples/console/runc deleted file mode 100755 index d79b6dc..0000000 --- a/examples/console/runc +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -env \ - BB_PRIMARY_DIR="../../Linux_Interp" BB_SECONDARY_DIR="$PWD" \ -../../Linux_Interp/blackboxc $@