错误:预期的导入指令或合同定义。每次,即使有了代码。我现在正在看的,不起作用
pragma solidity ^0.4.0;
interface Regulator {
function checkValue(uint amount) returns(bool);
function loan() returns(bool);
}
contract Bank is Regulator {
uint private value;
address private owner;
function Bank(uint amount){
value = amount;
owner = msg.sender;
}
modifier ownerFunc {
require(owner == msg.sender)
_;
}
function deposit(uint amount) {
value +- amount;
}
function withdraw(uint amount){
if(checkValue(amount)){
value -= amount;
}
}
function balance() returns(uint) {
return value;
}
function loan() returns(bool) {
return value > 0;
}
function checkValue(uint amount) returns(bool) {
return amount =< value;
}
}
浏览器/Untitled.sol:3:1:错误:预期的导入指令或合同定义。 接口调节器{ ^