In a Swift Playground we can do
But in VSCode I get errors like error: use of unresolved identifier 'pow'.
Obviously because the frameworks or missing part of LLDB??? I'm using the proper Swift extensions in VSCode like CodeLLDB etc.
Is it not possible to have a full swift IDE in VSCode?
EDIT: Nvermind. I had to import Foundation into VSCode as well
Awesome now I don't have to use Xcode for math playgrounds.
p.s. How is VSCode able to use Foundation? Is it because I am using CodeLLDB? Or is it because it just knows where to look for swift tools?
Code:
var n = 1.0
var result = 45 * pow(n,3) + 20 * pow(n,2) + 19
print(result)
But in VSCode I get errors like error: use of unresolved identifier 'pow'.
Obviously because the frameworks or missing part of LLDB??? I'm using the proper Swift extensions in VSCode like CodeLLDB etc.
Is it not possible to have a full swift IDE in VSCode?
EDIT: Nvermind. I had to import Foundation into VSCode as well
p.s. How is VSCode able to use Foundation? Is it because I am using CodeLLDB? Or is it because it just knows where to look for swift tools?