maillist@pvxplus.com

Message: previous - next
Month: January 2002

RE: [Pvx] Printable string

From: Marty Becker <mab@...>
Date: Wed, 30 Jan 2002 23:10:57 -0500
Chris,
	I have no idea how to make this a command, but this does the whole
thing. I was looking for and EASY way.

	This catches SEP's embedded in hex strings, ESC's and also the weird
double of quotes in a string.

0100 REM "STR""CALL TO CREATE DUMP LIKE OUTPUT OF STRING"
0200       ENTER X$
0220       WHILE LEN(X$)
0240       IF X$(1,1)=SEP
:           THEN IF MODE$="H"
:                 THEN LET OUTPUT$+="$+"
:                END_IF ;
:                IF MODE$="C"
:                 THEN LET OUTPUT$+=QUO+"+"
:                END_IF ;
:                LET MODE$="",OUTPUT$+="SEP+";
:                GOTO CONT
0260       IF X$(1,1)=ESC
:           THEN IF MODE$="H"
:                 THEN LET OUTPUT$+="$+"
:                END_IF ;
:                IF MODE$="C"
:                 THEN LET OUTPUT$+=QUO+"+"
:                END_IF ;
:                LET MODE$="",OUTPUT$+="ESC+";
:                GOTO CONT
0280       IF ASC(X$(1,1))<32 OR ASC(X$(1,1))>126
:           THEN IF MODE$<>"H"
:                 THEN IF MODE$="C"
:                       THEN LET OUTPUT$+=QUO+"+"
:                      END_IF ;
:                      LET MODE$="H",OUTPUT$+="$"
:                END_IF ;
:                LET OUTPUT$+=HTA(X$(1,1))
:           ELSE IF MODE$<>"C"
:                 THEN IF MODE$="H"
:                       THEN LET OUTPUT$+="$+"
:                      END_IF ;
:                      LET MODE$="C",OUTPUT$+=QUO
:                END_IF ;
:                LET OUTPUT$+=X$(1,1);
:                IF X$(1,1)=QUO
:                 THEN LET OUTPUT$+=QUO
0300 CONT:
:
0320       LET X$=X$(2)
0340       WEND
0360       IF MID(OUTPUT$,-1)="+"
:           THEN LET OUTPUT$=OUTPUT$(1,LEN(OUTPUT$)-1)
0380       IF MODE$="H"
:           THEN LET OUTPUT$+="$"
0400       IF MODE$="C"
:           THEN LET OUTPUT$+=QUO
0420       LET X$=OUTPUT$
0440       PRINT X$
0460       EXIT

	Tell me if you like it.


						Marty

-----Original Message-----
From: Chris Nolan [mailto:chris.nolan@...]
Sent: Wednesday, January 30, 2002 10:23 PM
To: 'providex@...'
Subject: RE: [Pvx] Printable string


Ok, here's a call program that does it - but I'm drawing a blank on how to
convert it to a *cmd ...  I think I have to go searching the variable table
via a DUMP to a memory channel and then VIS that?

0020 ENTER X$
0030 ! LET X$=MID(X$,2) ! When it's *CMD there is always a space on the
front
0040 IF LEN(X$)<1 THEN EXIT 
0050 FOR I=1 TO LEN(X$)
0060 IF ASC(MID(X$,I,1))<30 OR ASC(MID(X$,I,1))>126 THEN {
0061 IF NOT(FIRST) THEN LET OUTPUT$+=QUO+"+$",FIRST=1,QUOTESNEEDED=1
0070 LET OUTPUT$+=HTA(MID(X$,I,1))
0080  } ELSE {
0081 IF FIRST THEN LET OUTPUT$+="$+"+QUO,FIRST=0
0090 LET OUTPUT$+=MID(X$,I,1)
0100  }
0110 NEXT I
0111 IF FIRST THEN LET OUTPUT$+="$+"+QUO,FIRST=0
0120 LET OUTPUT$=SUB(OUTPUT$,"$8A$","SEP")
0130 IF QUOTESNEEDED THEN LET OUTPUT$=QUO+OUTPUT$+QUO
0140 IF MID(OUTPUT$,-3)="+"+QUO+QUO THEN LET
OUTPUT$=MID(OUTPUT$,1,LEN(OUTPUT$)-3)
0200 PRINT OUTPUT$
0300 END 
0499 CALL PGN,"Hello World"
0500 CALL PGN,"Hello "+$0000$+" World"
0510 CALL PGN,"Hello "+$0000$+" World"+$8A$

Fell Free to critic.

Chris Nolan

> -----Original Message-----
> From: Chris Nolan [mailto:chris.nolan@...] 
> Sent: Wednesday, January 30, 2002 22:07
> To: 'providex@...'
> Subject: RE: [Pvx] Printable string
> 
> 
> So Mike, you didn't answer the original question: is there a 
> langauge level
> equivilant of what DUMP does with the string?  
> 
> I suppose we could just write a *cmd ...  Anyone have one 
> already?  I'd
> write it now but I've got a deadline tomorrow.  Then again, I 
> do like to
> procrastinate with those deadlines...
> 
> Chris
> 
> > -----Original Message-----
> > From: Michael King (notebook) [mailto:mike.king@...] 
> > Sent: Wednesday, January 30, 2002 22:17
> > To: providex@...
> > Subject: Re: [Pvx] Printable string
> > 
> > 
> > For those of you who want to know what Chris said..
> > 
> > ->10 input x$;if ctl=4 stop else print ath(X$); goto *same
> > -:run
> > 524F54464C
> > ROTFL
> > 
> > 
> > 4254572C20466F722074686F736520696E7465726573746564206D79207369
> > 74652069732062
> > BTW, For those interested my site is b
> > 61636B206F6E6C696E65206173206F6620746869732070617374207765656B
> > 656E642E202043
> > ack online as of this past weekend.  C
> > 6865636B206F757420687474703A2F2F6E6F6C616E2E64796E646E732E6F72
> > 672F7076782F
> > heck out http://nolan.dyndns.org/pvx/
> > 
> > 
> > 4368726973204E6F6C616E
> > Chris Nolan
> > ------
> > Michael F. King <mike.king@...>
> > VP & General Manager
> > ProvideX Technologies
> > (Best Software Canada Ltd.)
> > 
> > ----- Original Message -----
> > From: Chris Nolan <chris.nolan@...>
> > To: <providex@...>
> > Sent: Wednesday, January 30, 2002 9:54 PM
> > Subject: RE: [Pvx] Printable string
> > 
> > 
> > > 524F54464C
> > >
> > >
> > 4254572C20466F722074686F736520696E7465726573746564206D79207369
> > 74652069732062
> > >
> > 61636B206F6E6C696E65206173206F6620746869732070617374207765656B
> > 656E642E202043
> > > 
> > 6865636B206F757420687474703A2F2F6E6F6C616E2E64796E646E732E6F72
> > 672F7076782F
> > >
> > > 4368726973204E6F6C616E
> > >
> > > > -----Original Message-----
> > > > From: Marty Becker [mailto:mab@...]
> > > > Sent: Wednesday, January 30, 2002 21:58
> > > > To: 'providex@...'
> > > > Subject: RE: [Pvx] Printable string
> > > >
> > > >
> > > > I knew you were a sick man.
> > > >
> > > > -----Original Message-----
> > > > From: Chris Nolan [mailto:chris.nolan@...]
> > > > Sent: Wednesday, January 30, 2002 9:36 PM
> > > > To: 'providex@...'
> > > > Subject: RE: [Pvx] Printable string
> > > >
> > > >
> > > > 492041677265652C2031303025
> > > >
> > > > > -----Original Message-----
> > > > > From: Marty Becker [mailto:mab@...]
> > > > > Sent: Wednesday, January 30, 2002 21:33
> > > > > To: 'providex@...'
> > > > > Subject: RE: [Pvx] Printable string
> > > > >
> > > > >
> > > > > Chris,
> > > > > You're right. I want to display generic data in a consistently
> > > > > printable form. The format that dump uses would be real
> > > > useful. Hta is
> > > > > useable but a little too tough to read for most things.
> > > > >
> > > > > Marty
> > > > >
> > > > > -----Original Message-----
> > > > > From: Chris Nolan [mailto:chris.nolan@...]
> > > > > Sent: Wednesday, January 30, 2002 9:23 PM
> > > > > To: 'providex@...'
> > > > > Subject: RE: [Pvx] Printable string
> > > > >
> > > > >
> > > > > No, that gets rid of the printables completely.  A handy
> > > > > thing but Marty & I
> > > > > want to see the non-printables represented the $xx$ on the
> > > > > same line as the
> > > > > printables.
> > > > >
> > > > > Chris Nolan
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: Ken Sproul [mailto:ksproul@...]
> > > > > > Sent: Wednesday, January 30, 2002 21:23
> > > > > > To: 'providex@...'
> > > > > > Subject: RE: [Pvx] Printable string
> > > > > >
> > > > > >
> > > > > > Was it the CVS(X$,16)?
> > > > > >
> > > > > > Ken Sproul
> > > > > > Softcare Computer Consulting Co. - Programmer/Analyst
> > > > > > ksproul@...
> > > > > >
> > > > > >
> > > > > > -----Original Message-----
> > > > > > From: Chris Nolan [mailto:chris.nolan@...]
> > > > > > Sent: Wednesday, January 30, 2002 9:16 PM
> > > > > > To: 'providex@...'
> > > > > > Subject: RE: [Pvx] Printable string
> > > > > >
> > > > > >
> > > > > > Good question, I'd like to know that too... I seem to
> > > > > > remember somebody
> > > > > > asking it a while back but don't recall the answer...
> > > > > >
> > > > > > Marty,
> > > > > >
> > > > > > What I do is just HTA(X$) of the string but that gives
> > > > > > the hex of
> > > > > > the whole thing, not just the non-printable's.
> > > > > >
> > > > > > Chris Nolan
> > > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: Marty Becker [mailto:mab@...]
> > > > > > > Sent: Wednesday, January 30, 2002 21:16
> > > > > > > To: PVX Mail List (E-mail)
> > > > > > > Subject: [Pvx] Printable string
> > > > > > >
> > > > > > >
> > > > > > > Is there a way to easily convert a string to a printable
> > > > > > > version such as the
> > > > > > > display in the dump directive.
> > > > > > > i.e. "abcde"+$000000$+sep+"xyz"
> > > > > > >
> > > > > > > Thanks in advance.
> > > > > > >
> > > > > > >
> > > > > > > *********************************************
> > > > > > > Marty Becker
> > > > > > > 215-226-2220 x107
> > > > > > > 215-226-2339 fax
> > > > > > > e-mail: marty@...
> > > > > > > *********************************************
> > > > > > >  <<Marty Becker.vcf>>
> > > > > > >
> > > > > > >
> > > > > >
> > > > > > To unsubscribe, e-mail: providex-unsubscribe@...
> > > > > > For additional commands, e-mail: providex-help@...
> > > > > >
> > > > > > To unsubscribe, e-mail: providex-unsubscribe@...
> > > > > > For additional commands, e-mail: providex-help@...
> > > > > >
> > > > >
> > > > > To unsubscribe, e-mail: providex-unsubscribe@...
> > > > > For additional commands, e-mail: providex-help@...
> > > > >
> > > > > To unsubscribe, e-mail: providex-unsubscribe@...
> > > > > For additional commands, e-mail: providex-help@...
> > > > >
> > > >
> > > > To unsubscribe, e-mail: providex-unsubscribe@...
> > > > For additional commands, e-mail: providex-help@...
> > > >
> > > > To unsubscribe, e-mail: providex-unsubscribe@...
> > > > For additional commands, e-mail: providex-help@...
> > > >
> > >
> > > To unsubscribe, e-mail: providex-unsubscribe@...
> > > For additional commands, e-mail: providex-help@...
> > >
> > 
> > 
> > To unsubscribe, e-mail: providex-unsubscribe@...
> > For additional commands, e-mail: providex-help@...
> > 
> 
> To unsubscribe, e-mail: providex-unsubscribe@...
> For additional commands, e-mail: providex-help@...
> 

To unsubscribe, e-mail: providex-unsubscribe@...
For additional commands, e-mail: providex-help@...