It will never get to Z and is upper case.

Dan

From: [email protected] <[email protected]> On Behalf Of Bruce 
Chitiea
Sent: Monday, May 17, 2021 12:36 PM
To: [email protected]
Subject: Re: [RBASE-L] - Increment letters

Dan:
(a) are you building a series, e.g.
12345C
12345D
...
12345Z

(b) do you run past ‘Z’, e.g.
12345AA

(c) is the numeric digit count fixed, or variable?

(d) always upper case?

Bruce
On May 17, 2021, 12:28 -0700, 'Karen Tellef' via RBASE-L 
<[email protected]<mailto:[email protected]>>, wrote:

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]<mailto:[email protected]>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rbase-l/1e1baaf3-c36a-44bc-837e-f66e03bec820%40Spark<https://groups.google.com/d/msgid/rbase-l/1e1baaf3-c36a-44bc-837e-f66e03bec820%40Spark?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/2E4830CEC16615458329D3D83342F8D0014E8C2371%40EXCHANGE10.

Reply via email to