Loading ...
Sorry, an error occurred while loading the content.
 

Re: [Clip] determining ASCII value of a character

Expand Messages
  • Jody
    Hi Ray, ... You did good! :) ... I would change the ^!Prompt to ^!Info so one can copy the characters. ... I use a modified Clip wrapper from my default
    Message 1 of 2 , Feb 18, 2001
      Hi Ray,

      >Dean Marteneau posed a question on the NT-Basic list asking how
      >to find the ASCII code of a character. The following is an
      >attempt to supply a clip that will accomplish this task. It is
      >my first clip (beyond "Hello World") that actually works.

      You did good! :)

      >I welcome suggestions from anyone as to how to improve my work.

      I would change the ^!Prompt to ^!Info so one can copy the characters.

      >I'd also welcome suggestions as to how to include the text of a
      >script in an email like this one so a user can easily try it.

      I use a modified Clip wrapper from my default Clipboard that
      Larry Thomas made a year or two ago. It follows your Clip and
      has some long lines in it. Just modify it to fit your needs.

      >;Get a character and store it in %character%
      >^!Set %character%=^$GetChar$
      >;Print a Prompt to the screen telling me the ASCII code of the
      >Current Character
      >^!info [L]ASCII code for ^%character% is: ^$CharToDec(^%character%)$


      <--- Copy below this line --->
      H=Clip Wrapper...
      ; Last Updated 02-18-2001, Sojourner@..., jody
      ^!ClearVariable %Do2Check%
      ^!ClearVariable %DateInfo%
      ^!SetScreenupdate Off
      ^!If ^$GetSelSize$ > 0 Skip_2
      ^!Toolbar Copy All
      ^!Goto Skip
      ^!Toolbar Copy
      ^!Toolbar New Document
      ^!SetWordWrap Off
      ^!Set %DateInfo%=^?[Date info==ntb-ClipClass^=ClipClass|Sojourner@...^=; Last updated ^$GetDate(mm-dd-yyyy)$, Sojourner@..., jody^%nl%|Jody@...^=; Last updated ^$GetDate(mm/dd/yyyy)$, Jody@...^%nl%; http://www.notetab.net^%nl%^%nl%|None^=]

      ^!IfDiff "^%DateInfo%" "ClipClass" Skip_2
      ^!Set %DateInfo%=; NoteTab ClipClass: Assignment #^%nl%; Jody Adair <Sojourner@...>^%nl%^%nl%
      ^!Set %Do2Check%=1

      <--- Copy below this line --->

      ^!PASTE

      ^!IfTrue ^%Do2Check% Next else Skip_2
      ^!InsertText ^%nl%<--- Copy above this line --->^%nl%<--- Add from Clipboard --->^%nl%
      ^!Goto Skip
      ^!InsertText ^%nl%<--- Copy above this line, right --->^%nl%<--- click over a Library, and --->^%nl%<--- choose "Add from Clipboard" --->^%nl%

      ^!Jump 1
      :Loop
      ^!Find ^H= RSA
      ^!IfError Finish else Next
      ^!Jump +1
      ^!InsertText ^%DateInfo%
      ^!Goto Loop
      :Finish
      ^!FOCUSDOC
      ^!Toolbar Copy all
      ^!Jump Doc_End
      ^!SetWordWrap On
      ^!Skip Your Clip is ready to paste.^%nl%^%nl%Discard Temporary Document?
      ^!Goto Exit
      ^!Close Discard

      <--- Copy above this line, right --->
      <--- click over a Library, and --->
      <--- choose "Add from Clipboard" --->

      Happy Clip'n!
      Jody

      http://www.notetab.net

      Subscribe, UnSubscribe, Options
      mailto:Ntb-Clips-Subscribe@yahoogroups.com
      mailto:Ntb-Clips-UnSubscribe@yahoogroups.com
      http://www.egroups.com/group/ntb-clips
    Your message has been successfully submitted and would be delivered to recipients shortly.