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: 
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>
If you have two words with same length, this will return first.

```
DEF VAR iCount      AS INT  NO-UNDO.
DEF VAR cLongest    AS CHAR NO-UNDO.
DEF VAR cString     AS CHAR NO-UNDO INIT 'Web Development Tool'.

DO  iCount = 1 TO NUM-ENTRIES(cString,' '):
    cLongest = (IF LENGTH(ENTRY(iCount,cString,' ')) > LENGTH(cLongest) THEN ENTRY(iCount,cString,' ') ELSE cLongest).
END.

MESSAGE cLongest
    VIEW-AS ALERT-BOX INFO BUTTONS OK.

```