|
Post by barryk on Feb 16, 2018 13:09:45 GMT 1
I am resurrecting a problem that I had sometime ago: basic-converter.proboards.com/thread/637/usec-substitution-bug...I had a string variable, let's say "thisfile$", but the "$" was objected to inside USEC. Alexfish recommended to define it without the "$": DECLARE thisfile TYPE char* thisfile="/tmp/pup_event_ipc/popup_msg" and "thisfile" can be used inside USEC. However, I am using BaCon 3.7.1, and this isn't working. DECLARE clientfile TYPE char*
clientfile=CONCAT$("/tmp/pup_event_ipc/",(*ent1).d_name) ...the second parameter doesn't matter. The point is, the CONCAT$() function doesn't work. It compiles, but the expected string is not getting assigned to "clientfile". I am obviously misunderstanding something here! Is the problem because "clientfile" is only a pointer, without space assigned to hold the string?
|
|
|
Post by barryk on Feb 16, 2018 13:33:57 GMT 1
Ha ha, vovchik, I am doing it again, solving my problem  This fixed it: DECLARE clientfile TYPE char* ... clientfile_str$=CONCAT$("/tmp/pup_event_ipc/",(*ent1).d_name) clientfile=clientfile_str$ ... USEC ... clientdescr=open(clientfile, O_WRONLY | O_APPEND); Don't know if that is the best way to do it, but it works.
|
|