From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: How do I convert hex numbers to decimal ? Date: Mon, 07 Sep 2009 05:56:22 +0300 Message-ID: <83zl9731k9.fsf@gnu.org> References: <1bfadfca-66ba-4aec-bb90-eb3a460c660c@l13g2000yqb.googlegroups.com> NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1252292338 21588 80.91.229.12 (7 Sep 2009 02:58:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 7 Sep 2009 02:58:58 +0000 (UTC) To: help-gnu-emacs@gnu.org, gnuist006@gmail.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Sep 07 04:58:47 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MkURK-00030y-UG for geh-help-gnu-emacs@m.gmane.org; Mon, 07 Sep 2009 04:58:47 +0200 Original-Received: from localhost ([127.0.0.1]:34061 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MkURK-0004sY-An for geh-help-gnu-emacs@m.gmane.org; Sun, 06 Sep 2009 22:58:46 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MkUQw-0004sR-67 for help-gnu-emacs@gnu.org; Sun, 06 Sep 2009 22:58:22 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MkUQu-0004sD-HC for help-gnu-emacs@gnu.org; Sun, 06 Sep 2009 22:58:20 -0400 Original-Received: from [199.232.76.173] (port=43937 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MkUQu-0004sA-By for help-gnu-emacs@gnu.org; Sun, 06 Sep 2009 22:58:20 -0400 Original-Received: from mtaout5.012.net.il ([84.95.2.13]:30803) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MkUQt-00009f-S8 for help-gnu-emacs@gnu.org; Sun, 06 Sep 2009 22:58:20 -0400 Original-Received: from conversion-daemon.i_mtaout5.012.net.il by i_mtaout5.012.net.il (HyperSendmail v2004.12) id <0KPK00E00YV65G00@i_mtaout5.012.net.il> for help-gnu-emacs@gnu.org; Mon, 07 Sep 2009 05:58:18 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.228.50.163]) by i_mtaout5.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0KPK00JDNYX57XY0@i_mtaout5.012.net.il>; Mon, 07 Sep 2009 05:58:18 +0300 (IDT) In-reply-to: <1bfadfca-66ba-4aec-bb90-eb3a460c660c@l13g2000yqb.googlegroups.com> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by monty-python.gnu.org: Solaris 9.1 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:67921 Archived-At: > From: bolega > Date: Sun, 6 Sep 2009 18:03:57 -0700 (PDT) > Cc: gnuist006@gmail.com > > 1) How do I convert hex numbers to decimal ? I presume you mean for external representation purposes, in which case just use the %d format. Otherwise, reading a hex number converts it automatically, so you don't need to bother about the internal representation. > 2) How do I convert ascii to the character that it represents, short > of a table ? Any function or simpler algorithm ? Use the %d format again. > 3) What are the variables Type "C-h v read-quoted-char-radix RET" etc. and you will be shown the documentation of the variable. > and how to set their values ? "M-x set-variable RET read-quoted-char-radix RET RET" > 4) How do i find the emacs lisp code for C-x = to see how it gives the > ascii of the char at the cursor and then use to find the reverse, ie > ascii to char ? "C-k C-x =". Sounds like you should read the basic parts of the Emacs manual and the Elisp manual, before you start coding in Lisp.