type
int_a = array of integer;
user = record //user type for account, extension
Username, Password : string;
end;
menu_op_s = string[50-12]; //s for string, word limit: 50-12 = 48, 50 for border length, 12 for fixed contect of each line, which is every character that's not an element of menu_op
subject = (Chi,Eng,Math,Ls,m1_2,Phy,Chem,Bio,ICT,VA,CI,CHIS,Econ,BAFS,HIS,GEOG,ERS);
rule_t = (CE_M3,c42x,M5,M6);
score_info_t= record
subject_t : array [subject] of boolean; //thx 5.5 taking my whole day
score : array [subject] of real;
subject_nx : integer;
end;
score_t = record
raw_scores : array [1..100] of score_info_t; //each prgramme have storage slot of 100 (for scores), raw score are scores that imposed weighting
medium_rare_score : array [1..100] of real; //readable score are weighted score
done_score : integer; //after comparasion, the final result is store here
record_c : integer; //current amount of record
end;
basic_info_t= record
code : string[6]; //length 6 = AB****
name : string;
weighting : array [subject] of integer;
rule : rule_t;
LQ,cutoff : score_t;
end;
programme_t = record
basic_info : array [1..500] of basic_info_t; // {{{{{{max programme expected : 500}}}}}}}
prog_c : integer; // {{{{{{Currenet programme amount}}}}}}}
ready : boolean;
end;
const
Subject_count = 17; //17 subject
extract_location = 'C:\Users\xdken\Downloads\ict sba\real program\outputs\';
acDB_location = 'C:\Users\xdken\Downloads\ict sba\real program\inputs\userDB.csv';
p_r_location = 'C:\Users\xdken\Downloads\ict sba\real program\inputs\past_records.csv';
p_s_location = 'C:\Users\xdken\Downloads\ict sba\real program\inputs\scoring.csv';
p_r_t_x = Subject_count;
p_r_t_y = 1000;
p_s_t_x = 2+Subject_count+1; //code,name,16 subject,rule
p_s_t_y = 1+500; //1 row of items + programme amout (500 row)
acDBsize = 500; //size of account DB
menu_op_c = 4; //c for count, 4 option in menu
menu_op : array [1..menu_op_c] of menu_op_s = ('programme data process and extraction' ,'enquiry' ,'expected result setting', 'Exit'); //the name of options, additional option can be modified here
var
i,j,it1,jt1,c,ti1,ti2,ti3,spec_i : integer; //i,j,c : count,it,jt : temp_i/j hat, ti : temp_integer
tri1 : real;
ts1,ts2,ts3 : string; //ts : temp_string
p_r,p_s,acdbt,extract : text; //tt : temp_text
error,choice,auth,bye : boolean;
s_t_v : subject; //subject type variable
p_r_t : array [1..p_r_t_y,1..p_r_t_x] of string;
p_s_t : array [1..p_s_t_y,1..p_s_t_x] of string;
acDB : array [1..acdbsize] of user;
progDB : programme_t;
subject_3_a : array [1..3] of integer;
subject_4_a : array [1..4] of integer;
subject_5_a : array [1..5] of integer;
subject_6_a : array [1..6] of integer;
subject_7_a : array [1..7] of integer;
ingredients : array [subject] of boolean;
dinner_recipie : rule_t;
t_string_prog_a : array [1..acDBsize] of string; //use to temply store progrmme names for searching