set5.gms : split file name

Description


Small Model of Type : GAMS


Category : GAMS Test library


Main file : set5.gms

$title split file name (SET5,SEQ=42)

$if not %system.filesys% == UNIX $goTo notunix
$setNames '/a/abc/def.geh' fp fn fe
$if NOT %fp% == /a/abc/  $error path should be /a/abc/
$if NOT %fn% == def      $error name should be def
$if NOT %fe% == .geh     $error name should be .geh
$show
$exit

$label notunix
$setNames 'a:\abc\def.geh' fp fn fe
$if NOT %fp% == a:\abc\  $error path should be a:\abc\
$if NOT %fn% == def      $error name should be def
$if NOT %fe% == .geh     $error name should be .geh
$show