If a task is solving with using Programming Taskbook then special input-output methods (procedures or functions) should be called in the student's program.
Brief info about input-output methods connected with the specific programming language is available from the Programming Taskbook window by pressing F1 key or «?» button on the window title (the Programming Taskbook window can be shown by using PT4Demo tool or running a program template created by PT4Load tool).
Brief description of input-output methods of programming languages that are supported by Programming Taskbook is shown below.
Data input:
procedure GetB(var A: boolean);
procedure GetN(var A: integer);
procedure GetR(var A: real);
procedure GetC(var A: char);
procedure GetS(var A: string);
procedure GetP(var A: PNode);
Data output:
procedure PutB(A: boolean);
procedure PutN(A: integer);
procedure PutR(A: real);
procedure PutC(A: char);
procedure PutS(A: string);
procedure PutP(A: PNode);
See additional information about PNode type in the description of the Dynamic group of tasks.
Data input:
void GetB(bool& a);
void GetN(int& a);
void GetD(double& a);
void GetC(char& a);
void GetS(char* a);
void GetS(string& a);
void GetP(TNode*& a);
Data output:
void PutB(bool a);
void PutN(int a);
void PutD(double a);
void PutC(char a);
void PutS(char* a);
void PutS(string a);
void PutP(TNode* a);
A special input-output stream called pt may be used for input-output operations. For instance, function calls GetN(a); GetD(b); GetS(s); may be replaced by one stream-read statement as follows: pt >> a >> b >> s;
See additional information about TNode type in the description of the Dynamic group of tasks.
Data input:
Public Sub GetB(ByRef A As Boolean)
Public Sub GetN(ByRef A As Integer)
Public Sub GetD(ByRef A As Double)
Public Sub GetS(ByRef A As String)
Data output:
Public Sub PutB(ByVal A As Boolean)
Public Sub PutN(ByVal A As Integer)
Public Sub PutD(ByVal A As Double)
Public Sub PutS(ByVal A As String)
The GetS and PutS procedures are intended for both string and character input-output because Visual Basic has no special type for characters.
Data input (C#):
public static bool GetBool();
public static int GetInt();
public static double GetDouble();
public static char GetChar();
public static string GetString();
public static Node GetNode();
Data input (VB.NET):
Public Shared Function GetBool() As Boolean
Public Shared Function GetInt() As Integer
Public Shared Function GetDouble() As Double
Public Shared Function GetChar() As Char
Public Shared Function GetString() As String
Public Shared Function GetNode() As Node
Data output (C#):
public static void Put(params object[] a);
Data output (VB.NET):
Public Shared Sub Put(ParamArray a() As Object)
Input-output operations for .NET languages are implemented as class methods of the PT class (the PT class is available for any student's program using Programming Taskbook).
The Put method may be used for output data of any admissible type (that is, any type that an input method is provided for).
See additional information about Node type in the description of the variant of the Dynamic group for .NET Framework.