global X

function saveX
 global X
 disp "inside saveX"
 X=1
 save -binary fileX X
endfunction

function loadX
 global X
 disp "inside loadX:"
 X=2
 load fileX
 disp "inside loadX after load:"
 X
endfunction

disp "starting:"
X=0
saveX
disp "after saveX:"
X
loadX
disp "after loadX:"
X
load fileX
disp "after load:"
X
clear all
disp "after clear:"
X