'=========================================================================== ' Subject: STACK EXAMPLE Date: 10-23-98 (20:44) ' Author: Thomas Laguzzi Code: QB, QBasic, PDS ' Origin: laguzzi@mail.dada.it Packet: ALGOR.ABC '=========================================================================== DEFINT A-Z:DIM SHARED K,S,B&,Z&:V1 'Created by PostIt! 7.2 SUB V1:OPEN "O",1,"STACK.ZIP",4^6:Z&=6117:?STRING$(50,177); U"%up()%9%'%I-%dG.rJ6,'Ow>-.%%+;%%%.%%%%xy%fhpS[ith.h'>B[d[8NHO1X U"0^&S(_.kFZAPQ4Es<47ABq#^g(84NCDJA/%417i&ndM2kb*=5K4a-3z&t+Cx_oCmSFjC U":>2C/=sTaz:Cup[DhXat4<\db=D#Nf94b6$'e[283/A1-3B.9hG)08d*lL_zNrm U"I';B$bP+E95a9<72;Q32Ge8&xBJXH183^GHJ$n+hAOoW8%76^?'U+V'^AnoA0&1 U"#COi.AI4Wgn:p%l)QH:B]4T8Z\\X$Q$i,bIx-FLXINQ9_N6djgls^;wIm+Xlfr?QE/+ U"Q/Hwfii*[HB3=\:p9_G3S-]lJ5*&ET^>B(nnYoNCHMm?NS28MktXRdgFS>7-u*- U"PvNhfo9^Qq4nqpeqh)PnNjF(R.go:Os6'5\6no)?27&Vvk3ZDE4E>&4yT/&2Fri U")r:8GneX3S_;p/Ph9J>paZ1M+EpA(qp26'HhYDw'SdTl6;w:\?uO_qc*-D)&\\a U";<:o;1a3,hU(XGf>8B/agBbpNu9>XB*d9Rd9UaNfoeUm)QEiOWqhYp1?D#qUgxw%D0\<);O0sn>fbdH:Y*uQp:46I U"BEuKhnfGG>iDBfd(5&4z+eq]R?/sfNYS#*7z3i3Z:b_CXg=Ic#,Nhp#0oMq2UsA U"^K^(T92ipB^>[8eJ9HB?>zR;>HM9ca$2wa7-zYO4=B$rEk-sg6/rVS=x:FWnQPT U"0>AvA<_u:1[^Ze\^wqykJE$/>iQ48ldNXSj5&#Iqr(2sr2PMoVlH$GENcpu#jF& U">mog'#]pgbN5L+ydx/J:#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