05-26-2008 04:57 AM
05-28-2008 12:13 PM
Hi Roberto,
I've been able to reproduce the issue you're encountering in this way:
gets(stringa);
Scan(stringa,"%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%cc",&target1,&target2,&target3,&target4,&target5,&target6,&target7,&target8,&target9,&target10,&target11,&target12,&target13,&target14,&target15,&target16,&target17,&target18,&target19,&target20,&target21,&target22,&target23,&target24,&target25,&target26,&target27,&target28,&target29);
In this way everything works fine, if I add another argument I get the Fatal Error that you're encountering.
So I guess the upper limit of the argument functions is not 14 but 29.
Regards,
Andrea N.
05-29-2008 02:23 AM
OK, for the moment I have solved in an alternative way; using your example:
Scan(stringa,"%c%c%c%c%c%c%c%c%c%c",
&target1, &target2, &target3, &target4, &target5, &target6, &target7, &target8, &target9, &target10);
ftmb = NumFmtdBytes ();
Scan (string + fmtb, "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c",
&target11, &target12, &target13, &target14, &target15, &target16, &target17, &target18, &target19, &target20,
&target21, &target22, &target23, &target24, &target25, &target26, &target27, &target28, &target29, &target30);
It would be better to update Scan documentation adding a warning about this limit, if this is not likely to change in the future.