Error messages

4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next

version 2003 (Modified)


This section describes the different messages generated by the compiler. These messages are of several different types:

warnings, that help you avoid common pitfalls;

errors, that it is up to you to correct;

range checking messages, generated within 4th Dimension.

Warnings


These messages are generated throughout the compilation process. Each message is accompanied here with an example of the problem and, when necessary, an additional explanation.

Pointer in COPY ARRAY

   COPY ARRAY(Pointer->;Array)

Pointer in SELECTION TO ARRAY

   SELECTION TO ARRAY(Pointer->;MyArray)
   SELECTION TO ARRAY([MyTable]MyField;Pointer->)

Pointer in ARRAY TO SELECTION

   ARRAY TO SELECTION(Pointer->;[MyTable]MyField)

Pointer in LIST TO ARRAY

   LIST TO ARRAY(List;Pointer->)

Pointer in ARRAY TO LIST

   ARRAY TO LIST(Pointer->;List)

Pointer in an array declaration

   ARRAY REAL(Pointer->;5)

The command ARRAY REAL(Array;Pointer->) does not generate this warning. The value of the dimension of an array does not have any influence on its type. In this example, the array referred to by the pointer must have been defined elsewhere.

Pointer in DISTINCT VALUES

   DISTINCT VALUES(Pointer->;Array)

Using the function Undefined is not advised.

   If(Undefined(Variable))

The Undefined function always returns FALSE in a compiled database.

This method is protected by a password.

An automatic action button does not have a name in the MyForm form on page X.

All of your buttons should have names to avoid conflicts.

Assumes that the pointer points to an alphanumeric expression.

   Pointer->[[2]]:="a"

Assumes that the string index is numeric.

   String[[Pointer->]]:="a"

Assumes that the array index is of type real.

   ALERT(MyArray{Pointer->})

Missing parameter in the plug-in procedure call.

   WR SET FONT(Area)

Error messages


These messages are generated throughout the compilation process. It is up to you to correct these errors in order to for the compiler to be able to generate a compiled database. Each message is accompanied here with an example of the problem and, when necessary, an additional explanation.

The messages are grouped by the following topics: Typing, Syntax, Parameters, Operators, Plug-in Commands and General Errors.

Typing

The type of the variable is not compatible with the operator. Cannot make an assignment with those types.

   MyReal:=12.3
   MyBoolean:=True
   MyReal:=MyBoolean

Changing the maximum length of a string.

   C_STRING(3;MyString)
   C_STRING(5;MyString)

Changing the number of dimensions of an array.

   ARRAY TEXT(MyArray;5;5)
   ARRAY TEXT(MyArray;5)

Typing conflict on the MyArray variable in the form.

   ARRAY INTEGER(MyArray)

Declaring an array without dimensions.

   ARRAY INTEGER(MyArray)

Variable expected.

   COPY ARRAY(MyArray;"")

Constant number expected.

   C_STRING(Variable;MyString)

The type of Variable is unknown. This variable is used in the method M1.

The type of Variable cannot be determined. A compiler directive is necessary.

Invalid constant type

   OK:="The weather is nice"

The method M1 is unknown.

The line contains a call to a method that does not exist or no longer exists.

Incorrect usage of a field.

   MyDate:=Add to date(BooleanField;1;1;1)

The length of a string cannot be greater than 255 characters.

   C_STRING(325;MyString)

The variable Variable is not a method.

   Variable(1)

The variable Variable is not an array.

   Variable{5}:=12

The result of the function is not compatible with the expression.

   Text:="Number"+Num(i)

The types of the variables used in this expression are not compatible.

   Integer:=MyDate*Text

Changing the type of the variable $i from type Fixed string to type Real.

   $i:="3"
   $($i):=5

The array index is not a number.

   IntArray{"3"}:=4

Retyping the variable Variable from type Text to an array of type Text.

   C_TEXT(Variable)
   COPY ARRAY(TextArray;Variable)

Retyping of the variable Variable from type Text to type Real.

   Variable:=Num(Variable)

Retyping the array MyBoolean from array of type Boolean to variable of type Real.

   Variable:=MyBoolean

Retyping the array IntArray from array of type Integer to array of type Text.

   ARRAY TEXT(IntArray;12)

if IntArray was declared elsewhere as an Integer array.

Trying to dereference a variable which is not of type Pointer.

   Variable->:=5

if Variable is not of the type Pointer.

Retyping of the variable Var1 from type Text to type Number.

   Var1:=3.5

Incorrect usage of a field.

   Variable:=[MyTable]MyField

[MyTable]MyField is a Date field. Variable is of the type Number.

Syntax

The result of the function is not a pointer.

   Variable:=Num("The weather is nice")->

It is not possible to dereference this function.

Syntax error.

   If(Boolean)
   End for

Too many opening curly brackets ({) .

The line contains more opening brackets than closing brackets.

Too many closing curly brackets (})..

The line contains more closing brackets than opening brackets.

Closing parenthesis ) expected.

The line contains more opening parentheses than closing parentheses.

Opening parenthesis ( expected.

The line contains more closing parentheses than opening parentheses.

Field expected.

   If(Modified(Variable))

Opening curly bracket expected.

   C_INTEGER($

Variable expected.

   C_INTEGER([MyTable]MyField)

Constant number expected.

   C_INTEGER(${"3"})

Semicolon ; expected.

   COPY ARRAY(Array1 Array2)

Mac OS:

Too many opening character reference symbols.

   MyString[[3:="a"

Too many closing character reference symbols.

   MyString3]]:="a"

Windows:

Too many opening character reference symbols.

   MyString[[3:="a"

Too many closing character reference symbols.

   MyString 3]]:="a"

Did not expect a subtable.

   ARRAY TO SELECTION(Array;Subtable)

The argument of an IF statement must be a boolean.

   If(Pointer)

Expression is too complex.

Divide your statement into several shorter statements.

Method is too complex.

Too many Case of...End case and/or If…End if structures.

Unknown field.

Your method, possibly copied from another database, contains ??? instead of a field name.

Unknown table.

Your method, possibly copied from another database, contains ??? instead of a table name.

Pointer to an incorrect expression.

   Pointer:=->Variable+3

Incorrect usage of string index.

   MyReal[[3]] or MyReal [[3]]

or

   MyString[[Variable]] or MyString[[Variable]]

where Variable is not a Number variable.

Parameters

The result of this function cannot be passed as a parameter to this method or command.

   MyMethod(Num(MyString))

if MyMethod expects a Boolean expression.

Too many parameters have been passed to this method.

   DEFAULT TABLE(Table;Form)

This value cannot be passed as a parameter to this method or command.

   MyMethod(3+2)

if MyMethod expects a Boolean expression.

Function result type conflict.

   C_INTEGER($0)
   $0:=False

Generic parameter type conflict.

   C_INTEGER(${3})
   For($i;3;5)
      ${$i}:=String($i)
   End for

This 4D command does not require any parameters.

   SHOW TOOL BAR(MyVar)

This 4D command requires at least one parameter.

   DEFAULT TABLE

MyString cannot be passed as a parameter to that method.

   MyMethod(MyString)

if MyMethod is expecting a Boolean parameter.

The type of the parameter $1 is different in the calling and in the called method.

   Calculate("3+2")

with the directive C_INTEGER($1) in Calculate.

One of the parameters in COPY ARRAY is a variable.

   COPY ARRAY(Variable;Array)

Retyping of the variable $1 from type Number to type Text.

   $1:=String($1)

An array cannot be a parameter.

   ReInit(MyArray)

To pass an array in a method, you need to pass a pointer to the array.

Operators

The type of the variable is not compatible with the operator.

   Bool2:=Bool1+True

Addition cannot be performed on Boolean fields.

Did not expect the operator >.

   QUERY(MyTable;[MyTable]MyField=0;>)

Cannot compare two variables of those types.

   If(Number=Picture2)

Cannot negate this type of variable.

   Boolean:=-False

Plug-in Commands

The plug-in command PExt does not seem to be correctly defined.

Not enough parameters were passed to this plug-in command.

Too many parameters were passed to this plug-in command.

The plug-in command Variable does not seem to be correctly defined.

General Errors

Two methods have the same name : Name.

To compile your database, all of the project methods must have different names.

Internal error # xx.

If this message appears, call 4D Technical Support and report the error number.

The variable Variable could not be typed. This variable is used in the method M1.

The Variable type cannot be determined. A compiler directive is necessary.

The original method is damaged.

The method is damaged in the original structure. Delete it or replace it.

Unknown 4D command.

The method is damaged.

Retyping the variable Variable in the form Form.

This message appears if you give, for example, the name OK to a variable of the type Graph in a form.

The name of the function Name is also the name of a variable in the form.

Rename either the function or the variable.

A method and a variable have the same name : Name.

Rename either the method or the variable.

A plug-in command and a variable have the same name : Name.

Rename either the plug-in command or the variable.

Range-checking messages


These messages are generated in 4th Dimension while the compiled database is running. They are displayed in a specific error window.

The result is out of range.

If MyArray is a five-element array, this message appears if you try to access element 17 in the array.

Division by zero.

   Var1:=0
   Var2:=2
   Var3:=Var2 / Var1

Accessing a parameter that does not exist.

Using the $4 local variable when only three parameters have been passed to the current method.

The pointer is not properly initialized.

   MyPointer->:=5

if MyPointer has not yet been initialized.

The destination string is smaller than the source.

   C_STRING(MyString1;5)
   C_STRING(MyString2;10)
   MyString2:="Flowers"
   MyString1:= MyString2

Invalid character reference.

   i:=-30
MyString[[i]]:= MyString2 or MyString[[i]]:=MyString2

The parameter is an empty string.

   MyString[[1]]:= ""
   MyString[[1]]:= ""

Modulo by zero.

   Var1:=0
   Var2:=2
   Var3:=Var2 % Var1

Invalid parameters in an Execute command.

   EXECUTE("MyMethod(MyAlpha)")

if MyMethod expects a parameter other than an Alphanumeric.

Pointer to an unknown variable.

   MyPointer:= Get pointer ("Variable")
   MyPointer:= "MyString"

if Variable does not appear explicitly in the database.

Attempting to retype by using a pointer.

   Boolean:=Pointer->

if Pointer points to a field of type Integer.

Bad usage of a pointer or pointer to an unknown variable.

   Character:=StringVar [[Pointer->]] 
   Character:=StringVar[[Pointer]]

if Pointer does not point to a Number.

See Also

Optimization Hints, Syntax Details, Typing Guide, Using Compiler Directives.


4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next