问题 I have this VHDL code, it should work as a sine generator with lookup table. I keep getting error "Missing EOF at function", or just "syntax error" in modelsim. I have the syntax from some online tutorial, and it seems to be correct. What is wrong? function WAVE(X : integer) -- here is the error marker return integer is variable foo: integer; begin WITH X SELECT foo := 0 WHEN 0, 4 WHEN 1, 7 WHEN 2, 11 WHEN 3, 14 WHEN 4, 18 WHEN 5, 21 WHEN 6, 25 WHEN 7, 28 WHEN 8, 32 WHEN 9, 35 WHEN 10, 38