Hi,
On
docs.xsharp.it/doku.php?id=codesamples:initalizing_net_array I read that an array can be initialized with:
local aNumbers as int[]
So I thought instead of:
PROTECTED aEmacc AS ARRAY OF EAccount
which gets corrupted by the designer, I could use:
PROTECTED aEmacc AS EAccount[]
But this behaves differently, I get error XS0266 ("Cannot implicitly convert type 'ARRAYBase<iConnectEmail.EAccount>' to 'iConnectEmail.EAccount[]'.") on the line:
SELF:aEmacc := GetAccountData()
where GetAccountData is defined as follows:
FUNCTION GetAccountData() AS ARRAY PASCAL
and error XS1503 ("Argument 1: cannot convert from 'iConnectEmail.EAccount[]' to 'ARRAYBase<iConnectEmail.EAccount>'") on the line:
dwFrom := GetDefAccNum(SELF:aEmacc)
where GetDefAccNum is defined as follows:
FUNCTION GetDefAccNum(aAccounts AS ARRAY OF EAccount) AS DWORD PASCAL
What is the difference between AS ARRAY OF EAccount and AS EAccount[] ?
Another question: is there any benefit in adding PASCAL or STRICT? In the documentation it says "Most calling conventions are for backward compatibility only." Can I just remove the PASCAL and STRICT without any consequence?
Kees.