Topic: this script does not work in version 5.3
indx := Trunc(random * Array_Length);
My Visual Database → General → this script does not work in version 5.3
indx := Trunc(random * Array_Length);
complete script
procedure Acessi_Button3_OnClick (Sender: string; var Cancel: boolean);
var
Char_Array: array of string;
I,PW_Length,indx,Array_Length: Integer;
Password,AlphaNum: String;
begin
If Acessi.Edit1.Text = '' then
Begin
MessageBox('Nessuna cifra inserita','Error',MB_OK+MB_ICONERROR);
Acessi.Edit1.SetFocus;
Exit;
End;
AlphaNum := 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
Array_Length := Length(AlphaNum);
Setlength(Char_Array,Array_Length);
For I := 0 to Array_Length - 1 do
Begin
Char_Array[i] := Copy(AlphaNum,I+1,1);
End;
Password := '';
PW_Length := StrToInt(Acessi.Edit1.text);
for I := 0 to PW_Length -1 do
begin
indx := Trunc(random * Array_Length);
Password := Password + Char_Array[indx];
end;
Acessi.edPassword.Text := Password;
end;
Please provide more details and project.
I think a problem with MVDB 5.3 beta - builder.dll-issue
I was using this example
replace this line
indx := Trunc(random * Array_Length);
to
indx := random(Array_Length);
My Visual Database → General → this script does not work in version 5.3
Powered by PunBB, supported by Informer Technologies, Inc.
Theme Hydrogen by Kushi