string error with +

new BookmarkLockedFalling
veneff
New Member
*

veneff Avatar

Posts: 29

Post by veneff on Jan 26, 2009 14:32:34 GMT -5

I had an assignment as:
DebugMsg$ = DATE$("mm/dd/yyyy")+" "+TIME$()+" "+DebugMsg$

and received the error:
Compile Error
Type mismatch - String expression expected.
DebugMsg$ = DATE$("mm/dd/yyyy")+" "+TIME$()+" "+DebugMsg$

I replaced the +(s) with ;(s) giving:
DebugMsg$ = DATE$("mm/dd/yyyy");" ";TIME$();" ";DebugMsg$

This worked.

Vance
StefanPendl
Global Moderator
*****

StefanPendl Avatar

Run for BASIC ...
Posts: 945

[b]Stefan[/b] - [a href=http://stefanpendl.runbasichosting.com/]Homepage[/a][br][br][b]Please give credit if you use code I post, no need to ask for permission.[/b][br][br]Run BASIC 1.01, Fire-/Waterfox (IE11, Edge), Windows 10 Professional x64, Intel Core i7-4710MQ 2.5GHz, 16GB RAM