That will work.  gets me headed in what I need. I can use ichar to get the 
letter and then increment it using char.

Thx!

Dan Goldberg

From: 'Karen Tellef' via RBASE-L <[email protected]>
Sent: Monday, May 17, 2021 12:28 PM
To: [email protected]
Subject: Re: [RBASE-L] - Increment letters

Dan:  I needed to find drive letter mappings on a workstation, so I did this 
code.  I'm searching for letters A - Z (ascii 65 thru 90).  I assume you can 
use it.  My code skipped the C drive because I was looking for USB drives.  I 
use the ascii codes of the letters.

Karen


SET VAR vAscii INT = 65, vTestDriveLet TEXT = NULL, vSQuit TEXT = NULL
WHILE 1 = 1 THEN
  SET VAR vTestDriveLet = (CHAR(.vAscii))
  IF vTestDriveLet = 'C' THEN
    SET VAR vAscii = (.vAscii + 1)
    CONTINUE
  ENDIF
  SET VAR vSFile TEXT = (.vTestDriveLet + ':\Scanned.txt')
  SET VAR vCount = (CHKFILE(.vSFile))
  IF vCount > 0 THEN
    -- Success.  Found a file so break out of routine
    BREAK
  ENDIF
  SET VAR vAscii = (.vAscii + 1)
  IF vAscii > 90 THEN
    PAUSE 2 USING 'I cannot find any drive on your computer that has a 
Scanned.Txt file' +
      CAPTION 'ERROR!' OPTION MESSAGE_FONT_SIZE 11
    SET VAR vSQuit TEXT = 'yes'
    BREAK
  ENDIF
ENDWHILE



-----Original Message-----
From: Dan Goldberg <[email protected]<mailto:[email protected]>>
To: [email protected]<mailto:[email protected]> 
<[email protected]<mailto:[email protected]>>
Sent: Mon, May 17, 2021 2:22 pm
Subject: [RBASE-L] - Increment letters
I have a number with a letter suffix.

12345C

I need to increment it to the next letter. So it would be:

12345D

Has anyone done this before? I am drawing a blank…

TIA

Dan Goldberg



--
For group guidelines, visit 
http://www.rbase.com/support/usersgroup_guidelines.php
---
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
[email protected]<mailto:[email protected]>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rbase-l/2E4830CEC16615458329D3D83342F8D0014E8C2298%40EXCHANGE10<https://groups.google.com/d/msgid/rbase-l/2E4830CEC16615458329D3D83342F8D0014E8C2298%40EXCHANGE10?utm_medium=email&utm_source=footer>.
--
For group guidelines, visit 
http://www.rbase.com/support/usersgroup_guidelines.php
---
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
[email protected]<mailto:[email protected]>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rbase-l/449828408.1609691.1621279677901%40mail.yahoo.com<https://groups.google.com/d/msgid/rbase-l/449828408.1609691.1621279677901%40mail.yahoo.com?utm_medium=email&utm_source=footer>.

-- 
For group guidelines, visit 
http://www.rbase.com/support/usersgroup_guidelines.php
--- 
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rbase-l/2E4830CEC16615458329D3D83342F8D0014E8C230C%40EXCHANGE10.

Reply via email to