Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uakari.primate.wisc.edu!dogie.macc.wisc.edu!vms.macc.wisc.edu From: pschwart@vms.macc.wisc.edu (Paul Schwartz) Newsgroups: comp.lang.pascal Subject: Re: HELP ! Message-ID: <4724@dogie.macc.wisc.edu> Date: 13 Nov 90 14:33:57 GMT Sender: news@dogie.macc.wisc.edu Organization: University of Wisconsin Academic Computing Center Lines: 22 In article <4650@gara.une.oz.au>, jjuanyse@gara.une.oz.au (Mr. XXX) writes... >If someone knows how to convert a string into an integer >please help me . Loop through the string left to right, each character represented by n, and apply the equation: int := (int * 10) + n e.g. 128 => integer int := (0 * 10) + 1 := 1 int := (1 * 10) + 2 := 12 int := (12 * 10) + 8 := 128 - Z - +-----------------------------------------------------------------------------+ | PauL M SchwartZ | | | PSCHWART@macc.wisc.edu | Your message here... | | PSCHWART@wiscmacc.BitNet | only 5$ per post | | (608)255-5702 | | +-----------------------------------------------------------------------------+