Path: news.cs.au.dk!Morten.Grouleff.Mjolner.Informatics From: Morten Grouleff Newsgroups: comp.lang.beta Subject: Re: Text to Hex Date: 11 May 1999 13:39:36 +0200 Organization: Mjolner Informatics. Lines: 25 Message-ID: References: <373317E0.E8C1990F@gmx.de> NNTP-Posting-Host: freki.mjolner.dk Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: xinwen.cs.au.dk 926422776 2901753 255.255.255.255 (11 May 1999 11:39:36 GMT) X-Complaints-To: news@cs.au.dk NNTP-Posting-Date: 11 May 1999 11:39:36 GMT X-Newsreader: Gnus v5.5/Emacs 19.34 Xref: news.cs.au.dk comp.lang.beta:11931 Jens Krause writes: > This time I want to ask if anybody knows a way to get the contents of an > edittext to a hex-value? > In Beta a hex value is 16x300, isn't it? > So I want that the edittext contains "300" and I need it as above. So, you have the text '300' in a text. How about the following: ORIGIN '~beta/basiclib/betaenv'; INCLUDE '~beta/basiclib/formatio'; --PROGRAM: descriptor-- (# t: ^Text; valAsInt: @Integer; do '300'->t[]; t.reset; '%x'->t.getFormat(# do x->valAsInt #); 'Value as integer: '->putText; valAsInt->putInt;newLine; #) Regards, -- ** Morten Grouleff: ** ** Earthworm Jim PC: ** ** Mjølner Informatics: **