Question: Define variable cWord as Character no-undo.

cWord = "Web Development Tool".

Needed OUTPUT

Development

How do i get the longest word from this when its a 1 variable only, 

This is a progress4gl code btw

Answer: 
```
DEFINE VARIABLE cWord          AS CHARACTER   NO-UNDO.
DEFINE VARIABLE iWord          AS INTEGER     NO-UNDO.
DEFINE VARIABLE iLongest       AS INTEGER     NO-UNDO.
DEFINE VARIABLE iLength        AS INTEGER     NO-UNDO.
DEFINE VARIABLE iLongestLength AS INTEGER     NO-UNDO.
DEFINE VARIABLE iEntries       AS INTEGER     NO-UNDO.

ASSIGN cWord = "Web Development Tool"

       iEntries = NUM-ENTRIES (cWord, " ").

DO iWord = 1 TO iEntries:

    ASSIGN iLength = LENGTH (ENTRY (iWord, cWord, " ")) . 

    IF iLength > iLongestLength THEN
    DO:
        ASSIGN iLongest       = iWord
               iLongestLength = iLength .        
    END.
END.

MESSAGE ENTRY (iLongest, cWord, " ") 
    VIEW-AS ALERT-BOX INFORMATION BUTTONS OK.

```
Just because my favorite hammer is a temp-table ;-)

```
def var cword as longchar no-undo init "Web Development Tool".

define temp-table tt no-undo
   field cc as char
   .

temp-table tt:read-json( 
    "longchar", 
    '~{"tt":[~{"cc":"' + replace( cword, ' ', '"},~{"cc":"' ) + '"}]}'
).

for each tt by length( cc ) descending:
    message tt.cc.
    leave.
end.

```

<https://abldojo.services.progress.com:443/#/?shareId=5e56f4a84b1a0f40c34b8c3c>