Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

patent10021

macrumors 68040
Original poster
Apr 23, 2004
3,578
850
In a Swift Playground we can do

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 :) 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?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.