Q:

QGIS data defined properties 'offset' syntax?

So I have a property field called 'offset', type=integer, range=0-359.  The intent is to draw an svg symbol that it offset 5 units radially away from the feature coordinate at the angle (in degrees) specified in the 'offset' field.  Basically if 'offset' is 45 and the feature coordinate is 0,0 then the symbol will be drawn at x=5*acos(45) y=5*asin(45) (sorry if the trig is wrong for the moment, you get the idea).  If 'offset' is 90 and the feature is at 0,0 then the symbol will be at x=5 y=0.
SO: the question is how to write this expression in the Data Defined Properties of the marker in the style dialog box?
(After hitting Data Defined Properties in the SVG marker dialog, check the 'Offset' box and no others...)
Ignoring the formulas for a minute, to get the syntax straight, I'm trying these on an object with 'offset' value = 5.
I've tried:
"offset","offset" -> not a valid expression
'"offset","offset"' -> valid expression, but no actual offset
concat(tostring("offset"),',',tostring("offset")) -> valid expression, but no actual offset
concat(tostring(offset),',',tostring(offset)) -> valid expression, but no actual offset
Several of the attempts give 'Expression is invalid' under 'Output preview' with the following, or similar, under 'more info':
Parser Error:
syntax error, unexpected COMMA, expecting $end
Eval Error:
No root node! Parsing failed?
As a reality check, the following expressions DO work as expected:
'5,5'

concat(tostring(5),',',tostring(5))

But the following gives the 'Expression is invalid' error:
5,5
So, apparently it does want a string?  Can anyone provide the correct syntax?  Thanks!

A:

This works for me:
format('%1,%2', tostring("offset"),5)

If offset is used in both places you can do 
format('%1,%1', tostring("offset"))

This is the same as doing:
tostring("offset") || ',' || tostring("offset")

but I find it clearer to use format()
format() returns a string. Using || also returns a string.

