Files
SyncHome/trunk/ulp/ex-argv-path.ulp
paolo.iocco ab6f495c89
2023-03-09 10:24:21 +00:00

18 lines
468 B
Plaintext

#usage "<b>Example: Usage of argv</b>\n"
"<p>"
"Returns the path of the ULP."
"<p>"
"<author>Author: support@cadsoft.de</author>"
// THIS PROGRAM IS PROVIDED AS IS AND WITHOUT WARRANTY OF ANY KIND, EXPRESSED OR IMPLIED
void main(void) {
string ulp_path = "";
char c = '/';
int pos = strrchr(argv[0], c);
if (pos >= 0) {
ulp_path = strsub(argv[0], 0, pos + 1);
}
dlgMessageBox(ulp_path , "+OK");
}